Skip to content

Commit 23dbefd

Browse files
committed
Fixed bug #51934 (strtotime plurals / incorrect time)
1 parent 20d8c1b commit 23dbefd

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ PHP NEWS
66
. Fixed bug GH-8575 (CLI closes standard streams too early). (Levi Morrison)
77

88
- Date:
9+
. Fixed bug #51934 (strtotime plurals / incorrect time). (Derick)
910
. Fixed bug #66019 (DateTime object does not support short ISO 8601 time
1011
format - YYYY-MM-DDTHH) (cmb, Derick)
1112
. Fixed bug #68549 (Timezones and offsets are not properly used when working

ext/date/tests/bug51934.phpt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--TEST--
2+
Bug #51934 (strtotime plurals / incorrect time)
3+
--FILE--
4+
<?php
5+
date_default_timezone_set('America/Los_Angeles');
6+
7+
echo date("Y-m-d H:i:s", strtotime("2010-05-27 19:18 4 Sunday ago")), "\n";
8+
echo date("Y-m-d H:i:s", strtotime("2010-05-27 19:18 4 Sundays ago")), "\n";
9+
?>
10+
--EXPECTF--
11+
2010-05-02 19:18:00
12+
2010-05-02 19:18:00

0 commit comments

Comments
 (0)