summaryrefslogtreecommitdiff
path: root/ext/standard/datetime.c
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2004-03-26 19:32:49 +0000
committerRasmus Lerdorf <rasmus@php.net>2004-03-26 19:32:49 +0000
commita40518164b76bcd9352835ac373f85119036d30c (patch)
treeadb36db9ea5454040e39f1310420a591c85d4272 /ext/standard/datetime.c
parentc52cc1c333fb7d6ac56337127f8ce6b61f872bd2 (diff)
downloadphp-git-a40518164b76bcd9352835ac373f85119036d30c.tar.gz
MFB: The 2am offset was a bad choice as this hour doesn't necessarily exist
on a DST switch. So use 4am instead. Fixes bug #27719
Diffstat (limited to 'ext/standard/datetime.c')
-rw-r--r--ext/standard/datetime.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c
index 63f127d23b..fe973c8042 100644
--- a/ext/standard/datetime.c
+++ b/ext/standard/datetime.c
@@ -191,12 +191,12 @@ void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm)
val = (*arguments[0])->value.lval;
/*
We don't use 1 here to work around problems in some mktime implementations
- when it comes to daylight savings time. Setting it to 2 and working back from
+ when it comes to daylight savings time. Setting it to 4 and working back from
there with the chgsecs offset makes us immune to these problems.
See http://bugs.php.net/27533 for more info.
*/
- if (val < 2) {
- chgsecs += (2-val) * 60*60; val = 2;
+ if (val < 4) {
+ chgsecs += (4-val) * 60*60; val = 4;
}
ta->tm_hour = val;
/* fall-through */