ID: 25937 Updated by: [EMAIL PROTECTED] Reported By: six at t0x dot net -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Linux 2.4 PHP Version: 4.3.4RC2 New Comment:
We are happy to tell you that you just discovered Daylight Savings Time. For more information see: http://webexhibits.org/daylightsaving/b.html Instead of using mktime/date consider using gmmktime and gmdate which do not suffer from DST. ...strtotime($wd." GMT")... Previous Comments: ------------------------------------------------------------------------ [2003-10-21 11:45:16] six at t0x dot net Description: ------------ In reproduce code : strtotime('Monday') returns the timestamp of Sunday/23h, but other ones are okay. This may be related to the current date (bug submited and results obtained on Tuesday 21st) as there is no bug when querying the timestamp of a day-of-week that's not yet passed. Reproduce code: --------------- <? $a = array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"); foreach ($a as $wd) echo date("d-m-Y H:i:s", strtotime($wd))."\n"; ?> Expected result: ---------------- 27-10-2003 00:00:00 21-10-2003 00:00:00 22-10-2003 00:00:00 23-10-2003 00:00:00 24-10-2003 00:00:00 25-10-2003 00:00:00 26-10-2003 00:00:00 Actual result: -------------- 26-10-2003 23:00:00 21-10-2003 00:00:00 22-10-2003 00:00:00 23-10-2003 00:00:00 24-10-2003 00:00:00 25-10-2003 00:00:00 26-10-2003 00:00:00 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25937&edit=1