]> granicus.if.org Git - php/commitdiff
MSVC's mktime() does not examine the existence of a daylight-saving-time zone
authorKai Schroeder <k.schroeder@php.net>
Sun, 9 Feb 2003 12:28:31 +0000 (12:28 +0000)
committerKai Schroeder <k.schroeder@php.net>
Sun, 9 Feb 2003 12:28:31 +0000 (12:28 +0000)
ext/standard/datetime.c

index 13b92322f0f44fb60a8e78869274345d101c2fac..39a7e4c96b5f22441193d82d35e234dc3e3b21c2 100644 (file)
@@ -123,7 +123,15 @@ void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm)
        */
        switch(arg_count) {
        case 7: /* daylight saving time flag */
+#ifdef PHP_WIN32
+               if (daylight > 0) {
+                       ta->tm_isdst = is_dst = Z_LVAL_PP(arguments[6]);
+               } else {
+                       ta->tm_isdst = is_dst = 0;
+               }
+#else
                ta->tm_isdst = is_dst = Z_LVAL_PP(arguments[6]);
+#endif
                /* fall-through */
        case 6: /* year */
                /* special case: