Annotation of embedaddon/php/ext/date/tests/004.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: date() format params
3: --FILE--
4: <?php
5:
6: date_default_timezone_set("UTC");
7: $tz = array("UTC", "Asia/Jerusalem", "America/Chicago", "Europe/London");
8: $t = mktime(0, 0, 0, 6, 27, 2006);
9:
10: foreach ($tz as $zone) {
11: date_default_timezone_set($zone);
12:
13: var_dump(date("w", $t));
14: var_dump(date("z", $t));
15: var_dump(date("n", $t));
16: var_dump(date("t", $t));
17: var_dump(date("L", $t));
18: var_dump(date("a", $t));
19: var_dump(date("B", $t));
20: var_dump(date("g", $t));
21: var_dump(date("G", $t));
22: var_dump(date("Z", $t));
23: var_dump(date("U", $t));
24: }
25:
26: echo "Done\n";
27: ?>
28: --EXPECTF--
29: string(1) "2"
30: string(3) "177"
31: string(1) "6"
32: string(2) "30"
33: string(1) "0"
34: string(2) "am"
35: string(3) "041"
36: string(2) "12"
37: string(1) "0"
38: string(1) "0"
39: string(10) "1151366400"
40: string(1) "2"
41: string(3) "177"
42: string(1) "6"
43: string(2) "30"
44: string(1) "0"
45: string(2) "am"
46: string(3) "041"
47: string(1) "3"
48: string(1) "3"
49: string(5) "10800"
50: string(10) "1151366400"
51: string(1) "1"
52: string(3) "176"
53: string(1) "6"
54: string(2) "30"
55: string(1) "0"
56: string(2) "pm"
57: string(3) "041"
58: string(1) "7"
59: string(2) "19"
60: string(6) "-18000"
61: string(10) "1151366400"
62: string(1) "2"
63: string(3) "177"
64: string(1) "6"
65: string(2) "30"
66: string(1) "0"
67: string(2) "am"
68: string(3) "041"
69: string(1) "1"
70: string(1) "1"
71: string(4) "3600"
72: string(10) "1151366400"
73: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>