|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32588 strtotime() error for 'last xxx' DST problem
Submitted: 2005-04-05 14:21 UTC Modified: 2005-06-16 21:12 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: alan at ridersite dot org Assigned: derick
Status: Closed Package: Date/time related
PHP Version: 5.0.3, 4.3.10 OS: Linux
Private report: No CVE-ID:
 [2005-04-05 14:21 UTC] alan at ridersite dot org
strtotime() in error when DST is bridged.

Code illustrates bug

Reproduce code:
echo date('D Y/m/d/H:i:s', time()). "<br>";

echo date('D Y/m/d/H:i:s', strtotime('last saturday')). "<br>";
echo date('D Y/m/d/H:i:s', strtotime("last sunday")). "<br>";
echo date('D Y/m/d/H:i:s', strtotime('last monday')). "<br>";

Expected result:
Tue 2005/04/05/08:15:48

Sat 2005/04/02/00:00:00
Sun 2005/04/03/00:00:00
Mon 2005/04/04/00:00:00

Actual result:
Tue 2005/04/05/08:15:48

Fri 2005/04/01/23:00:00
Sat 2005/04/02/23:00:00
Mon 2005/04/04/00:00:00


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-05 14:32 UTC]
Might be a duplicate, but will check it out.
 [2005-04-09 00:08 UTC] cdarklock at injuryfree dot com
Having same bug on 5.0.3; looks to be a simple fix in parsedate.y for someone that knows his way around it, but I'm not that someone.
 [2005-06-16 21:12 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

Fixed for PHP 5.1.
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Wed Nov 25 04:01:33 2015 UTC