From:             martin at tradex dot sk
Operating system: FreeBSD 4.9-RELEASE i386
PHP version:      4.3.5
PHP Bug Type:     Date/time related
Bug description:  mktime() reports wrong time for day of change to daily savings time 
CET->CEST

Description:
------------
mktime() reports wrong time in PHP version 4.3.5 under special
circumstances(4.3.4 works well). It reports a wrong negative unixtime when
requesting mktime() for March 28, 2004 = the day of CET/CEST timezone
change (2:00 AM -> 3:00 AM). The wrong time is reported in mktime interval
from (0, 0, 0, 03, 28, 2004); to (1, 59, 59, 03, 28, 2004);



Tested on: FreeBSD 4.9, PHP 4.3.5

Timezone: CET / CEST



Reproduce code:
---------------
echo mktime(0, 0, 0, 03, 28, 2004) . "\n" . mktime(1, 59, 59, 03, 28,
2004);



Expected result:
----------------
1080428400

1080435599



this result is the correct result from PHP 4.3.4

Actual result:
--------------
-7262

-3601



this is the wrong result from PHP 4.3.5

-- 
Edit bug report at http://bugs.php.net/?id=27754&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27754&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27754&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27754&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27754&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27754&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27754&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27754&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27754&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27754&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27754&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27754&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27754&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27754&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27754&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27754&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27754&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27754&r=float

Reply via email to