From: Kai Schroeder Date: Sun, 9 Feb 2003 12:28:01 +0000 (+0000) Subject: MSVC's mktime() does not examine the existence of a daylight-saving-time zone X-Git-Tag: RELEASE_0_5~1196 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e2449846103c0352dc2213e28c1f4beb923ea60;p=php MSVC's mktime() does not examine the existence of a daylight-saving-time zone --- diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index 13b92322f0..39a7e4c96b 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -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: