php.net |  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
Votes:1
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 (profile)
Status: Closed Package: Date/time related
PHP Version: 5.0.3, 4.3.10 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alan at ridersite dot org
New email:
PHP Version: OS:

 

 [2005-04-05 14:21 UTC] alan at ridersite dot org
Description:
------------
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-05 14:32 UTC] derick@php.net
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] derick@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed for PHP 5.1.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC