|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-10-21 15:09 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 14:00:01 2025 UTC |
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