diff options
Diffstat (limited to 'ext/standard/tests/time/bug17988.phpt')
-rw-r--r-- | ext/standard/tests/time/bug17988.phpt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ext/standard/tests/time/bug17988.phpt b/ext/standard/tests/time/bug17988.phpt new file mode 100644 index 0000000000..5fbc3c845f --- /dev/null +++ b/ext/standard/tests/time/bug17988.phpt @@ -0,0 +1,33 @@ +--TEST-- +Bug #17988 strtotime handling of postgresql timestamps +--FILE-- +<?php +putenv("TZ=GMT"); +echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728"))."\n"; +echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 GMT"))."\n"; +echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 MET"))."\n"; +echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 MEST"))."\n"; +echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 EDT"))."\n"; +echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-00"))."\n"; +echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+00"))."\n"; +echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-04"))."\n"; +echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+04"))."\n"; +echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-0300"))."\n"; +echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+0300"))."\n"; +echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-0330"))."\n"; +echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+0330"))."\n"; +?> +--EXPECT-- +2002-06-25 14:18:48 +2002-06-25 14:18:48 +2002-06-25 13:18:48 +2002-06-25 12:18:48 +2002-06-25 18:18:48 +2002-06-25 14:18:48 +2002-06-25 14:18:48 +2002-06-25 18:18:48 +2002-06-25 10:18:48 +2002-06-25 17:18:48 +2002-06-25 11:18:48 +2002-06-25 17:48:48 +2002-06-25 10:48:48 |