summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-11-28 23:49:25 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-11-28 23:49:25 +0000
commit22f2b206b7127d78e70f90cbf6a173520f0fd5b9 (patch)
treea0a8126c5fda40a81f44c9834ac630d593586254 /ext
parent52e1590285e2b5230578a7a4f0759a3fbd5f574f (diff)
downloadphp-git-22f2b206b7127d78e70f90cbf6a173520f0fd5b9.tar.gz
Fixed bug #35422 (strtotime() does not parse times with UTC as timezone).
Diffstat (limited to 'ext')
-rw-r--r--ext/date/lib/timezonemap.h1
-rw-r--r--ext/date/tests/bug35422.phpt12
2 files changed, 13 insertions, 0 deletions
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