Annotation of embedaddon/php/ext/date/tests/DateTime_data-fall-type2-type2.inc, revision 1.1.1.1
1.1 misho 1: <?php
2:
3: /*
4: * Note: test names match method names in a set of PHPUnit tests
5: * in a userland package. Please be so kind as to leave them.
6: */
7:
8: date_default_timezone_set('America/New_York');
9:
10:
11: /*
12: * Time, Fall, Zone Type 2 to Zone Type 2
13: *
14: * + prev: the day before the transition day 2010-11-06 18:38:28 EDT
15: * + dt: daylight time on transition day 2010-11-07 00:10:20 EDT
16: * + redodt: daylight time in the redo period 2010-11-07 01:12:33 EDT
17: * + redost: standard time in the redo period 2010-11-07 01:14:44 EST
18: * + st: standard time on the transition day 2010-11-07 03:16:55 EST
19: * + post: the day after the transition day 2010-11-08 19:59:59 EST
20: * + dtsec: daylight time 1 sec before change 2010-11-07 01:59:59 EDT
21: * + stsec: standard time first second 2010-11-07 01:00:00 EST
22: */
23: echo "test_time_fall_type2_prev_type2_prev: ";
24: $end = new DateTime('2010-11-06 18:38:28 EDT'); // prev, zt2
25: $start = new DateTime('2010-10-04 02:18:48 EDT'); // sp prev, zt2
26: examine_diff($end, $start, 'P+0Y1M2DT16H19M40S', 33);
27:
28: echo "test_time_fall_type2_prev_type2_dt: ";
29: $end = new DateTime('2010-11-07 00:10:20 EDT'); // dt, zt2
30: $start = new DateTime('2010-11-06 18:38:28 EDT'); // prev, zt2
31: examine_diff($end, $start, 'P+0Y0M0DT5H31M52S', 0);
32:
33: echo "test_time_fall_type2_prev_type2_redodt: ";
34: $end = new DateTime('2010-11-07 01:12:33 EDT'); // redodt, zt2
35: $start = new DateTime('2010-11-06 18:38:28 EDT'); // prev, zt2
36: examine_diff($end, $start, 'P+0Y0M0DT6H34M5S', 0);
37:
38: echo "test_time_fall_type2_prev_type2_redost: ";
39: $end = new DateTime('2010-11-07 01:14:44 EST'); // redost, zt2
40: $start = new DateTime('2010-11-06 18:38:28 EDT'); // prev, zt2
41: examine_diff($end, $start, 'P+0Y0M0DT7H36M16S', 0);
42:
43: echo "test_time_fall_type2_prev_type2_st: ";
44: $end = new DateTime('2010-11-07 03:16:55 EST'); // st, zt2
45: $start = new DateTime('2010-11-06 18:38:28 EDT'); // prev, zt2
46: examine_diff($end, $start, 'P+0Y0M0DT9H38M27S', 0);
47:
48: echo "test_time_fall_type2_prev_type2_post: ";
49: $end = new DateTime('2010-11-08 19:59:59 EST'); // post, zt2
50: $start = new DateTime('2010-11-06 18:38:28 EDT'); // prev, zt2
51: examine_diff($end, $start, 'P+0Y0M2DT1H21M31S', 2);
52:
53: echo "test_time_fall_type2_dt_type2_prev: ";
54: $end = new DateTime('2010-11-06 18:38:28 EDT'); // prev, zt2
55: $start = new DateTime('2010-11-07 00:10:20 EDT'); // dt, zt2
56: examine_diff($end, $start, 'P-0Y0M0DT5H31M52S', 0);
57:
58: echo "test_time_fall_type2_dt_type2_dt: ";
59: $end = new DateTime('2010-11-07 00:15:35 EDT'); // sp dt, zt2
60: $start = new DateTime('2010-11-07 00:10:20 EDT'); // dt, zt2
61: examine_diff($end, $start, 'P+0Y0M0DT0H5M15S', 0);
62:
63: echo "test_time_fall_type2_dt_type2_redodt: ";
64: $end = new DateTime('2010-11-07 01:12:33 EDT'); // redodt, zt2
65: $start = new DateTime('2010-11-07 00:10:20 EDT'); // dt, zt2
66: examine_diff($end, $start, 'P+0Y0M0DT1H2M13S', 0);
67:
68: echo "test_time_fall_type2_dt_type2_redost: ";
69: $end = new DateTime('2010-11-07 01:14:44 EST'); // redost, zt2
70: $start = new DateTime('2010-11-07 00:10:20 EDT'); // dt, zt2
71: examine_diff($end, $start, 'P+0Y0M0DT2H4M24S', 0);
72:
73: echo "test_time_fall_type2_dt_type2_st: ";
74: $end = new DateTime('2010-11-07 03:16:55 EST'); // st, zt2
75: $start = new DateTime('2010-11-07 00:10:20 EDT'); // dt, zt2
76: examine_diff($end, $start, 'P+0Y0M0DT4H6M35S', 0);
77:
78: echo "test_time_fall_type2_dt_type2_post: ";
79: $end = new DateTime('2010-11-08 19:59:59 EST'); // post, zt2
80: $start = new DateTime('2010-11-07 00:10:20 EDT'); // dt, zt2
81: examine_diff($end, $start, 'P+0Y0M1DT20H49M39S', 1);
82:
83: echo "test_time_fall_type2_redodt_type2_prev: ";
84: $end = new DateTime('2010-11-06 18:38:28 EDT'); // prev, zt2
85: $start = new DateTime('2010-11-07 01:12:33 EDT'); // redodt, zt2
86: examine_diff($end, $start, 'P-0Y0M0DT6H34M5S', 0);
87:
88: echo "test_time_fall_type2_redodt_type2_dt: ";
89: $end = new DateTime('2010-11-07 00:10:20 EDT'); // dt, zt2
90: $start = new DateTime('2010-11-07 01:12:33 EDT'); // redodt, zt2
91: examine_diff($end, $start, 'P-0Y0M0DT1H2M13S', 0);
92:
93: echo "test_time_fall_type2_redodt_type2_redodt: ";
94: $end = new DateTime('2010-11-07 01:15:35 EDT'); // sp redodt, zt2
95: $start = new DateTime('2010-11-07 01:12:33 EDT'); // redodt, zt2
96: examine_diff($end, $start, 'P+0Y0M0DT0H3M2S', 0);
97:
98: echo "test_time_fall_type2_redodt_type2_redost: ";
99: $end = new DateTime('2010-11-07 01:14:44 EST'); // redost, zt2
100: $start = new DateTime('2010-11-07 01:12:33 EDT'); // redodt, zt2
101: examine_diff($end, $start, 'P+0Y0M0DT1H2M11S', 0);
102:
103: echo "test_time_fall_type2_redodt_type2_st: ";
104: $end = new DateTime('2010-11-07 03:16:55 EST'); // st, zt2
105: $start = new DateTime('2010-11-07 01:12:33 EDT'); // redodt, zt2
106: examine_diff($end, $start, 'P+0Y0M0DT3H4M22S', 0);
107:
108: echo "test_time_fall_type2_redodt_type2_post: ";
109: $end = new DateTime('2010-11-08 19:59:59 EST'); // post, zt2
110: $start = new DateTime('2010-11-07 01:12:33 EDT'); // redodt, zt2
111: examine_diff($end, $start, 'P+0Y0M1DT19H47M26S', 1);
112:
113: echo "test_time_fall_type2_redost_type2_prev: ";
114: $end = new DateTime('2010-11-06 18:38:28 EDT'); // prev, zt2
115: $start = new DateTime('2010-11-07 01:14:44 EST'); // redost, zt2
116: examine_diff($end, $start, 'P-0Y0M0DT7H36M16S', 0);
117:
118: echo "test_time_fall_type2_redost_type2_dt: ";
119: $end = new DateTime('2010-11-07 00:10:20 EDT'); // dt, zt2
120: $start = new DateTime('2010-11-07 01:14:44 EST'); // redost, zt2
121: examine_diff($end, $start, 'P-0Y0M0DT2H4M24S', 0);
122:
123: echo "test_time_fall_type2_redost_type2_redodt: ";
124: $end = new DateTime('2010-11-07 01:12:33 EDT'); // redodt, zt2
125: $start = new DateTime('2010-11-07 01:14:44 EST'); // redost, zt2
126: examine_diff($end, $start, 'P-0Y0M0DT1H2M11S', 0);
127:
128: echo "test_time_fall_type2_redost_type2_redost: ";
129: $end = new DateTime('2010-11-07 01:16:54 EST'); // sp redodt, zt2
130: $start = new DateTime('2010-11-07 01:14:44 EST'); // redost, zt2
131: examine_diff($end, $start, 'P+0Y0M0DT0H2M10S', 0);
132:
133: echo "test_time_fall_type2_redost_type2_st: ";
134: $end = new DateTime('2010-11-07 03:16:55 EST'); // st, zt2
135: $start = new DateTime('2010-11-07 01:14:44 EST'); // redost, zt2
136: examine_diff($end, $start, 'P+0Y0M0DT2H2M11S', 0);
137:
138: echo "test_time_fall_type2_redost_type2_post: ";
139: $end = new DateTime('2010-11-08 19:59:59 EST'); // post, zt2
140: $start = new DateTime('2010-11-07 01:14:44 EST'); // redost, zt2
141: examine_diff($end, $start, 'P+0Y0M1DT18H45M15S', 1);
142:
143: echo "test_time_fall_type2_st_type2_prev: ";
144: $end = new DateTime('2010-11-06 18:38:28 EDT'); // prev, zt2
145: $start = new DateTime('2010-11-07 03:16:55 EST'); // st, zt2
146: examine_diff($end, $start, 'P-0Y0M0DT9H38M27S', 0);
147:
148: echo "test_time_fall_type2_st_type2_dt: ";
149: $end = new DateTime('2010-11-07 00:10:20 EDT'); // dt, zt2
150: $start = new DateTime('2010-11-07 03:16:55 EST'); // st, zt2
151: examine_diff($end, $start, 'P-0Y0M0DT4H6M35S', 0);
152:
153: echo "test_time_fall_type2_st_type2_redodt: ";
154: $end = new DateTime('2010-11-07 01:12:33 EDT'); // redodt, zt2
155: $start = new DateTime('2010-11-07 03:16:55 EST'); // st, zt2
156: examine_diff($end, $start, 'P-0Y0M0DT3H4M22S', 0);
157:
158: echo "test_time_fall_type2_st_type2_redost: ";
159: $end = new DateTime('2010-11-07 01:14:44 EST'); // redost, zt2
160: $start = new DateTime('2010-11-07 03:16:55 EST'); // st, zt2
161: examine_diff($end, $start, 'P-0Y0M0DT2H2M11S', 0);
162:
163: echo "test_time_fall_type2_st_type2_st: ";
164: $end = new DateTime('2010-11-07 05:19:56 EST'); // sp st, zt2
165: $start = new DateTime('2010-11-07 03:16:55 EST'); // st, zt2
166: examine_diff($end, $start, 'P+0Y0M0DT2H3M1S', 0);
167:
168: echo "test_time_fall_type2_st_type2_post: ";
169: $end = new DateTime('2010-11-08 19:59:59 EST'); // post, zt2
170: $start = new DateTime('2010-11-07 03:16:55 EST'); // st, zt2
171: examine_diff($end, $start, 'P+0Y0M1DT16H43M4S', 1);
172:
173: echo "test_time_fall_type2_post_type2_prev: ";
174: $end = new DateTime('2010-11-06 18:38:28 EDT'); // prev, zt2
175: $start = new DateTime('2010-11-08 19:59:59 EST'); // post, zt2
176: examine_diff($end, $start, 'P-0Y0M2DT1H21M31S', 2);
177:
178: echo "test_time_fall_type2_post_type2_dt: ";
179: $end = new DateTime('2010-11-07 00:10:20 EDT'); // dt, zt2
180: $start = new DateTime('2010-11-08 19:59:59 EST'); // post, zt2
181: examine_diff($end, $start, 'P-0Y0M1DT20H49M39S', 1);
182:
183: echo "test_time_fall_type2_post_type2_redodt: ";
184: $end = new DateTime('2010-11-07 01:12:33 EDT'); // redodt, zt2
185: $start = new DateTime('2010-11-08 19:59:59 EST'); // post, zt2
186: examine_diff($end, $start, 'P-0Y0M1DT19H47M26S', 1);
187:
188: echo "test_time_fall_type2_post_type2_redost: ";
189: $end = new DateTime('2010-11-07 01:14:44 EST'); // redost, zt2
190: $start = new DateTime('2010-11-08 19:59:59 EST'); // post, zt2
191: examine_diff($end, $start, 'P-0Y0M1DT18H45M15S', 1);
192:
193: echo "test_time_fall_type2_post_type2_st: ";
194: $end = new DateTime('2010-11-07 03:16:55 EST'); // st, zt2
195: $start = new DateTime('2010-11-08 19:59:59 EST'); // post, zt2
196: examine_diff($end, $start, 'P-0Y0M1DT16H43M4S', 1);
197:
198: echo "test_time_fall_type2_post_type2_post: ";
199: $end = new DateTime('2010-11-08 19:59:59 EST'); // post, zt2
200: $start = new DateTime('2010-11-08 18:57:55 EST'); // sp post, zt2
201: examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0);
202:
203: echo "test_time_fall_type2_dtsec_type2_stsec: ";
204: $end = new DateTime('2010-11-07 01:00:00 EST'); // stsec, zt2
205: $start = new DateTime('2010-11-07 01:59:59 EDT'); // dtsec, zt2
206: examine_diff($end, $start, 'P+0Y0M0DT0H0M1S', 0);
207:
208: echo "test_time_fall_type2_stsec_type2_dtsec: ";
209: $end = new DateTime('2010-11-07 01:59:59 EDT'); // dtsec, zt2
210: $start = new DateTime('2010-11-07 01:00:00 EST'); // stsec, zt2
211: examine_diff($end, $start, 'P-0Y0M0DT0H0M1S', 0);
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>