1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Fixed bug #35422 (strtotime() does not parse times with UTC as timezone).
Fixed bug #35414 (strtotime() no longer works with ordinal suffix).
This commit is contained in:
Ilia Alshanetsky
2005-11-29 01:31:52 +00:00
parent 2303ff493c
commit eed6f67ffa
5 changed files with 7046 additions and 5212 deletions
+7018 -5211
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -719,7 +719,7 @@ tz = "("? [A-Za-z]{1,4} ")"? | [A-Z][a-z]+([_/][A-Z][a-z]+)+;
tzcorrection = [+-] hour24 ":"? minutelz?;
month = "0"? [0-9] | "1"[0-2];
day = [0-2]?[0-9] | "3"[01];
day = ([0-2]?[0-9] | "3"[01])([a-z][a-z])?;
year = [0-9]{1,4};
year2 = [0-9]{2};
year4 = [0-9]{4};
+1
View File
@@ -885,6 +885,7 @@
{ "gmt", 0, 0, "GB" },
{ "gmt", 0, 0, "GB-Eire" },
{ "gmt", 0, 0, "GMT" },
{ "utc", 0, 0, "UTC" },
{ "gmt", 0, 0, "Iceland" },
{ "gst", 0, 14400, "Asia/Dubai" },
{ "gst", 0, 14400, "Asia/Bahrain" },
+14
View File
@@ -0,0 +1,14 @@
--TEST--
Bug #35414 (strtotime() no longer works with ordinal suffix)
--FILE--
<?php
date_default_timezone_set("UTC");
echo date(DATE_ISO8601, strtotime("Sat 26th Nov 2005 18:18")) . "\n";
echo date(DATE_ISO8601, strtotime("Dec. 4th, 2005")) . "\n";
echo date(DATE_ISO8601, strtotime("December 4th, 2005")) . "\n";
?>
--EXPECT--
2004-12-26T18:18:00+0000
2005-12-04T00:00:00+0000
2005-12-04T00:00:00+0000
+12
View File
@@ -0,0 +1,12 @@
--TEST--
Bug #35422 (strtotime() does not parse times with UTC as timezone)
--FILE--
<?php
date_default_timezone_set("UTC");
echo date(DATE_ISO8601, strtotime("July 1, 2000 00:00:00 UTC")) . "\n";
echo date(DATE_ISO8601, strtotime("July 1, 2000 00:00:00 GMT")) . "\n";
?>
--EXPECT--
2000-07-01T00:00:00+0000
2000-07-01T00:00:00+0000