xref: /PHP-7.2/ext/date/tests/bug17988.phpt (revision e4f3fb97)
1--TEST--
2Bug #17988 (strtotime handling of postgresql timestamps)
3--INI--
4date.timezone=GMT
5--FILE--
6<?php
7echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728"))."\n";
8echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 GMT"))."\n";
9echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 EDT"))."\n";
10echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-00"))."\n";
11echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+00"))."\n";
12echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-04"))."\n";
13echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+04"))."\n";
14echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-0300"))."\n";
15echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+0300"))."\n";
16echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-0330"))."\n";
17echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+0330"))."\n";
18?>
19--EXPECT--
202002-06-25 14:18:48
212002-06-25 14:18:48
222002-06-25 18:18:48
232002-06-25 14:18:48
242002-06-25 14:18:48
252002-06-25 18:18:48
262002-06-25 10:18:48
272002-06-25 17:18:48
282002-06-25 11:18:48
292002-06-25 17:48:48
302002-06-25 10:48:48
31