From: john dot j at fphoenix dot co dot uk
Operating system: Mac OS X 10.2.8
PHP version: 4.3.4
PHP Bug Type: Date/time related
Bug description: Bug #21966 is not bogus
Description:
------------
Bug #21966 does exist in 4.3.4 running on Mac OS X
10.2.8. It is directly related to the daylight saving
time changeover date (28 March 2004 in the UK).
Presumably this date is different for different locales
therefore the dates in reproduce code below only
reproduce the bug in the UK locale.
Reproduce code:
---------------
<?php
{
echo '<p>27/3/04 = ' . strval(mktime(00,0,0,3,27,2004)) . '</p>'; //
1080345600
echo '<p>28/3/04 = ' . strval(mktime(0,0,0,3,28,2004)) . '</p>'; //
-3662 - should be 108042840
echo '<p>28/3/04 = ' . strval(mktime(2,0,0,3,28,2004)) . '</p>'; //
1080435600
echo '<p>29/3/04 = ' . strval(mktime(0,0,0,3,29,2004)) . '</p>'; //
1080514800
echo '<p>30/3/04 = ' . strval(mktime(0,0,0,3,30,2004)) . '</p>'; //
1080601200
} ?>
Expected result:
----------------
On the changeover date, times between midnight and 2 am
exhibit the bug. Times from 2 am onwards are correct.
I haven't checked, but I would bet the date in the
original bug report was the DST changeover date for the
locale of the person who submitted it.
Actual result:
--------------
27/3/04 = 1080345600
28/3/04 = -3662
28/3/04 = 1080435600
29/3/04 = 1080514800
30/3/04 = 1080601200
--
Edit bug report at http://bugs.php.net/?id=27860&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27860&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27860&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27860&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27860&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27860&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27860&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27860&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27860&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27860&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27860&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27860&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27860&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27860&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27860&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27860&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27860&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27860&r=float