summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Schroeder <k.schroeder@php.net>2003-02-09 12:28:31 +0000
committerKai Schroeder <k.schroeder@php.net>2003-02-09 12:28:31 +0000
commit9675190c46fdd28e4ce6e24ff2f84581ed7d88e0 (patch)
treec797157aa91c24c423f147d39d2172d3c69dc6cf
parenteef3cdf70be836ee3aa0150ed6fb0e4febed6d7d (diff)
downloadphp-git-9675190c46fdd28e4ce6e24ff2f84581ed7d88e0.tar.gz
MSVC's mktime() does not examine the existence of a daylight-saving-time zone
-rw-r--r--ext/standard/datetime.c8
1 files changed, 8 insertions, 0 deletions
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: