Annotation of embedaddon/php/ext/date/tests/mktime-3-64bit.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: mktime() [3] (64-bit)
3: --SKIPIF--
4: <?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK" ?>
5: --INI--
6: error_reporting=2047
7: --FILE--
8: <?php
9: $tzs = array("America/Toronto", "Europe/Oslo");
10: $years = array(0, 69, 70, 71, 99, 100, 101, 105, 110, 1900, 1901, 1902, 1999, 2000, 2001);
11:
12: foreach ($tzs as $tz) {
13: echo $tz, "\n";
14: date_default_timezone_set($tz);
15: foreach ($years as $year) {
16: printf("Y: %4d - ", $year);
17: $ret = mktime(1, 1, 1, 1, 1, $year);
18: if ($ret == FALSE) {
19: echo "out of range\n";
20: } else {
21: echo date("F ".DATE_ISO8601, $ret), "\n";
22: }
23: }
24: echo "\n";
25: }
26: ?>
27: --EXPECT--
28: America/Toronto
29: Y: 0 - January 2000-01-01T01:01:01-0500
30: Y: 69 - January 2069-01-01T01:01:01-0500
31: Y: 70 - January 1970-01-01T01:01:01-0500
32: Y: 71 - January 1971-01-01T01:01:01-0500
33: Y: 99 - January 1999-01-01T01:01:01-0500
34: Y: 100 - January 2000-01-01T01:01:01-0500
35: Y: 101 - January 0101-01-01T01:01:01-0500
36: Y: 105 - January 0105-01-01T01:01:01-0500
37: Y: 110 - January 0110-01-01T01:01:01-0500
38: Y: 1900 - January 1900-01-01T01:01:01-0500
39: Y: 1901 - January 1901-01-01T01:01:01-0500
40: Y: 1902 - January 1902-01-01T01:01:01-0500
41: Y: 1999 - January 1999-01-01T01:01:01-0500
42: Y: 2000 - January 2000-01-01T01:01:01-0500
43: Y: 2001 - January 2001-01-01T01:01:01-0500
44:
45: Europe/Oslo
46: Y: 0 - January 2000-01-01T01:01:01+0100
47: Y: 69 - January 2069-01-01T01:01:01+0100
48: Y: 70 - January 1970-01-01T01:01:01+0100
49: Y: 71 - January 1971-01-01T01:01:01+0100
50: Y: 99 - January 1999-01-01T01:01:01+0100
51: Y: 100 - January 2000-01-01T01:01:01+0100
52: Y: 101 - January 0101-01-01T01:01:01+0100
53: Y: 105 - January 0105-01-01T01:01:01+0100
54: Y: 110 - January 0110-01-01T01:01:01+0100
55: Y: 1900 - January 1900-01-01T01:01:01+0100
56: Y: 1901 - January 1901-01-01T01:01:01+0100
57: Y: 1902 - January 1902-01-01T01:01:01+0100
58: Y: 1999 - January 1999-01-01T01:01:01+0100
59: Y: 2000 - January 2000-01-01T01:01:01+0100
60: Y: 2001 - January 2001-01-01T01:01:01+0100
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>