12345678910111213141516171819202122232425262728293031323334 |
- --TEST--
- Bug #72096: Swatch time value incorrect for dates before 1970
- --INI--
- date.timezone=UTC
- --FILE--
- <?php
- for ($unix = 1461283200; $unix <= 1461369600; $unix += 8000) {
- echo "Time:", gmdate('Y-m-d H:i:s = B', $unix), PHP_EOL;
- echo "Time:", gmdate('Y-m-d H:i:s = B', $unix - 82 * 365 * 24 * 3600), PHP_EOL;
- }
- ?>
- --EXPECT--
- Time:2016-04-22 00:00:00 = 041
- Time:1934-05-13 00:00:00 = 041
- Time:2016-04-22 02:13:20 = 134
- Time:1934-05-13 02:13:20 = 134
- Time:2016-04-22 04:26:40 = 226
- Time:1934-05-13 04:26:40 = 226
- Time:2016-04-22 06:40:00 = 319
- Time:1934-05-13 06:40:00 = 319
- Time:2016-04-22 08:53:20 = 412
- Time:1934-05-13 08:53:20 = 412
- Time:2016-04-22 11:06:40 = 504
- Time:1934-05-13 11:06:40 = 504
- Time:2016-04-22 13:20:00 = 597
- Time:1934-05-13 13:20:00 = 597
- Time:2016-04-22 15:33:20 = 689
- Time:1934-05-13 15:33:20 = 689
- Time:2016-04-22 17:46:40 = 782
- Time:1934-05-13 17:46:40 = 782
- Time:2016-04-22 20:00:00 = 875
- Time:1934-05-13 20:00:00 = 875
- Time:2016-04-22 22:13:20 = 967
- Time:1934-05-13 22:13:20 = 967
|