rasmus Fri Mar 26 14:32:49 2004 EDT Modified files: /php-src/ext/standard datetime.c Log: 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 http://cvs.php.net/diff.php/php-src/ext/standard/datetime.c?r1=1.117&r2=1.118&ty=u Index: php-src/ext/standard/datetime.c diff -u php-src/ext/standard/datetime.c:1.117 php-src/ext/standard/datetime.c:1.118 --- php-src/ext/standard/datetime.c:1.117 Fri Mar 12 12:29:52 2004 +++ php-src/ext/standard/datetime.c Fri Mar 26 14:32:49 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: datetime.c,v 1.117 2004/03/12 17:29:52 rasmus Exp $ */ +/* $Id: datetime.c,v 1.118 2004/03/26 19:32:49 rasmus Exp $ */ #include "php.h" #include "zend_operators.h" @@ -191,12 +191,12 @@ 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 */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php