File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,6 @@ echo $result . "\n";
2828?>
2929--EXPECT--
30302000-01-01 13:00:00
31- 2000-01-01 11:00:00
32312000-01-01 13:00:00
32+ 2000-01-01 11:00:00
33332000-01-01 13:00:00
Original file line number Diff line number Diff line change 1+ --TEST--
2+ Test for timelib #124: Problem with large negative timestamps
3+ --INI--
4+ date.timezone=UTC
5+ --FILE--
6+ <?php
7+ var_dump ((new DateTime ("@-9223372036854775808 " ))->getTimestamp ());
8+ var_dump ((new DateTime ('-292277022657-01-27 08:29:52 UTC ' ))->getTimestamp ());
9+ var_dump ((new DateTime ('-292277022657-01-27 08:29:53 UTC ' ))->getTimestamp ());
10+
11+ var_dump ((new DateTime ("@9223372036854775807 " ))->getTimestamp ());
12+ var_dump ((new DateTime ('+292277026596-12-04 15:30:07 UTC ' ))->getTimestamp ());
13+ echo (new DateTime ('+2512370164-01-01 00:00:00Z ' ))->format (DATE_RFC3339_EXTENDED );
14+ ?>
15+ --EXPECT--
16+ int(-9223372036854775808)
17+ int(-9223372036854775808)
18+ int(-9223372036854775807)
19+ int(9223372036854775807)
20+ int(9223372036854775807)
21+ 2512370164-01-01T00:00:00.000+00:00
You can’t perform that action at this time.
0 commit comments