xref: /PHP-7.2/ext/date/tests/bug48058.phpt (revision ba41b340)
1--TEST--
2Bug #48058 (Year formatter goes wrong with out-of-int range)
3--INI--
4date.timezone=UTC
5--FILE--
6<?php
7date_default_timezone_set("Europe/London");
8$tz = new DateTimeZone("Europe/London");
9$tran = $tz->getTransitions();
10var_dump( $tran[0] );
11
12$base_time = '28 Feb 2008 12:00:00';
13$dt = date_create( "$base_time +10000000000 years" );
14echo date_format( $dt, DATE_ISO8601 );
15?>
16--EXPECTF--
17array(5) {
18  ["ts"]=>
19  int(-%d)
20  ["time"]=>
21  string(%d) "%s"
22  ["offset"]=>
23  int(%s)
24  ["isdst"]=>
25  bool(%s)
26  ["abbr"]=>
27  string(%d) "%s"
28}
2910000002008-02-28T12:00:00+0000
30