From: six at t0x dot net Operating system: Linux 2.4 PHP version: 4.3.4RC2 PHP Bug Type: Date/time related Bug description: strtotime weirdness with days of week
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 bug report at http://bugs.php.net/?id=25937&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25937&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25937&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25937&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25937&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25937&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25937&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25937&r=support Expected behavior: http://bugs.php.net/fix.php?id=25937&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25937&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25937&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25937&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25937&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25937&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25937&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25937&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=25937&r=float