From: nickj-phpbugs at nickj dot org Operating system: Debian Woody GNU/Linux 3.0r6 PHP version: 5CVS-2005-06-20 (dev) PHP Bug Type: Date/time related Bug description: Time rendering bug in the date() function for the Lord Howe timezone
Description: ------------ [Excerpt from end of bug 20382, for a separate problem that should be logged as a new bug]: Compare the PHP script: <?php putenv("TZ=Australia/Lord_Howe"); $tStamp = mktime (17, 17, 17, 1, 1, 1970); echo $tStamp, "\n"; print "tStamp=". date("l Y-m-d H:i:s T", $tStamp). "\n"; $strtotime_tstamp = strtotime("Monday", $tStamp); echo $strtotime_tstamp, "\n"; print "result=".date("l Y-m-d H:i:s T", $strtotime_tstamp)."\n"; print "wanted=Monday 00:00:00\n\n"; ?> output: 26237 tStamp=Thursday 1970-01-01 17:17:17 EST 306000 result=Sunday 1970-01-04 23:00:00 EST wanted=Monday 00:00:00 with the code that the timelib does: [EMAIL PROTECTED]:/dat/dev/timelib$ ./tester-create-ts "1970-01-01 17:17:17 Monday" "" "Australia/Lord_Howe" TS: 306000 | 1970-01-05 00:00:00 LHST Australia/Lord_Howe 0Y 0M 0D / 0H 0M 0S / 0 [EMAIL PROTECTED]:/dat/dev/timelib$ ./tester-render-ts 306000 Australia/Lord_Howe TYPE: 3 TS: 306000 | 1970-01-05 00:00:00 LHST Australia/Lord_Howe You see that the timestamp is the same, but that the date() function renders it wrongly as 1970-01-04 23:00:00 EST while it should have been 1970-01-05 00:00:00 LHST. The EST is not even part of the timezone information for Lord Howe. -- Edit bug report at http://bugs.php.net/?id=33402&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33402&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33402&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33402&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33402&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33402&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33402&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33402&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33402&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33402&r=support Expected behavior: http://bugs.php.net/fix.php?id=33402&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33402&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33402&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33402&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33402&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33402&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33402&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33402&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33402&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33402&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33402&r=mysqlcfg