|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #51934 strtotime plurals / incorrect time
Submitted: 2010-05-27 19:18 UTC Modified: 2022-05-13 10:57 UTC
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: brent dot hansen at gmail dot com Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 5.3.2 OS: Win 7 Pro
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: brent dot hansen at gmail dot com
New email:
PHP Version: OS:


 [2010-05-27 19:18 UTC] brent dot hansen at gmail dot com
Pluralization seems to remove 1 hour from calculation or drops daylight savings adjustment.

date.timezone = America/Los_Angeles
Correction to PHP version: 5.3.1

Test script:
date("Y-m-d H:i:s",strtotime("4 Sunday ago"));
date("Y-m-d H:i:s",strtotime("4 Sundays ago"));

Expected result:
2010-05-01 00:00:00
2010-05-01 00:00:00

Actual result:
2010-05-01 00:00:00
2010-04-30 23:00:00


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-03 13:11 UTC]
It interprets the S as Sierra Time Zone. Similar to:
echo date("Y-m-d H:i:s",strtotime("4 SundayPST ago"));
 [2010-06-03 13:52 UTC]
-Type: Bug +Type: Feature/Change Request -Assigned To: +Assigned To: derick
 [2010-06-03 13:52 UTC]
Changing this to a feature request instead
 [2017-10-24 07:52 UTC]
-Status: Assigned +Status: Open -Assigned To: derick +Assigned To:
 [2021-08-11 11:03 UTC]
For reference: <>.
 [2022-05-13 10:57 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: derick
 [2022-05-13 10:57 UTC]
Fixed in the dependent 'timelib' library, likely for PHP 8.1.7 or 8.1.1, depending on timing.
 [2022-05-20 12:25 UTC]
Automatic comment on behalf of derickr
Log: Fixed bug #51934 (strtotime plurals / incorrect time)
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Jun 10 12:03:37 2023 UTC