Skip to content

Commit

Permalink
Fixed bug #51934 (strtotime plurals / incorrect time)
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed May 20, 2022
1 parent 20d8c1b commit 23dbefd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ PHP NEWS
. Fixed bug GH-8575 (CLI closes standard streams too early). (Levi Morrison)

- Date:
. Fixed bug #51934 (strtotime plurals / incorrect time). (Derick)
. Fixed bug #66019 (DateTime object does not support short ISO 8601 time
format - YYYY-MM-DDTHH) (cmb, Derick)
. Fixed bug #68549 (Timezones and offsets are not properly used when working
Expand Down
12 changes: 12 additions & 0 deletions ext/date/tests/bug51934.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--TEST--
Bug #51934 (strtotime plurals / incorrect time)
--FILE--
<?php
date_default_timezone_set('America/Los_Angeles');

echo date("Y-m-d H:i:s", strtotime("2010-05-27 19:18 4 Sunday ago")), "\n";
echo date("Y-m-d H:i:s", strtotime("2010-05-27 19:18 4 Sundays ago")), "\n";
?>
--EXPECTF--
2010-05-02 19:18:00
2010-05-02 19:18:00

0 comments on commit 23dbefd

Please sign in to comment.