diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-11-28 23:49:25 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-11-28 23:49:25 +0000 |
commit | 22f2b206b7127d78e70f90cbf6a173520f0fd5b9 (patch) | |
tree | a0a8126c5fda40a81f44c9834ac630d593586254 | |
parent | 52e1590285e2b5230578a7a4f0759a3fbd5f574f (diff) | |
download | php-git-22f2b206b7127d78e70f90cbf6a173520f0fd5b9.tar.gz |
Fixed bug #35422 (strtotime() does not parse times with UTC as timezone).
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | ext/date/lib/timezonemap.h | 1 | ||||
-rw-r--r-- | ext/date/tests/bug35422.phpt | 12 |
3 files changed, 15 insertions, 0 deletions
@@ -4,6 +4,8 @@ PHP NEWS - Fixed bug #35456 (+ 1 [time unit] format did not work). (Ilia) - Fixed bug #35431 (PDO crashes when using LAZY fetch with fetchAll). (Wez) - Fixed bug #35430 (PDO crashes on incorrect FETCH_FUNC use). (Tony) +- Fixed bug #35422 (strtotime() does not parse times with UTC as timezone). + (Ilia) - Fixed bug #35409 (undefined reference to 'rl_completion_matches'). (Jani) - Fixed bug #35399 (Since fix of bug #35273 SOAP decoding of soapenc:base64binary fails). (Dmitry) diff --git a/ext/date/lib/timezonemap.h b/ext/date/lib/timezonemap.h index 00a66d6374..2cb341f6f3 100644 --- a/ext/date/lib/timezonemap.h +++ b/ext/date/lib/timezonemap.h @@ -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" }, diff --git a/ext/date/tests/bug35422.phpt b/ext/date/tests/bug35422.phpt new file mode 100644 index 0000000000..8273c75411 --- /dev/null +++ b/ext/date/tests/bug35422.phpt @@ -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 |