Back to index

php5  5.3.10
DateTime_data-fall-type3-type3.inc
Go to the documentation of this file.
00001 <?php
00002 
00003 /*
00004  * Note: test names match method names in a set of PHPUnit tests
00005  * in a userland package.  Please be so kind as to leave them.
00006  */
00007 
00008 date_default_timezone_set('America/New_York');
00009 
00010 
00011 /*
00012  * Time, Fall, Zone Type 3 to Zone Type 3
00013  *
00014  * + prev: the day before the transition day  2010-11-06 18:38:28
00015  * + dt: daylight time on transition day      2010-11-07 00:10:20
00016  * + redodt: daylight time in the redo period 2010-11-07 01:12:33 EDT, + TZ
00017  * + redost: standard time in the redo period 2010-11-07 01:14:44 EST, + TZ
00018  * + st: standard time on the transition day  2010-11-07 03:16:55
00019  * + post: the day after the transition day   2010-11-08 19:59:59
00020  * + dtsec: daylight time 1 sec before change 2010-11-07 01:59:59 EDT, + TZ
00021  * + stsec: standard time first second        2010-11-07 01:00:00 EST, + TZ
00022  */
00023 echo "test_time_fall_type3_prev_type3_prev: ";
00024 $end   = new DateTime('2010-11-06 18:38:28');  // prev, zt3
00025 $start = new DateTime('2010-10-04 02:18:48');  // sp prev, zt3
00026 examine_diff($end, $start, 'P+0Y1M2DT16H19M40S', 33);
00027 
00028 echo "test_time_fall_type3_prev_type3_dt: ";
00029 $end   = new DateTime('2010-11-07 00:10:20');  // dt, zt3
00030 $start = new DateTime('2010-11-06 18:38:28');  // prev, zt3
00031 examine_diff($end, $start, 'P+0Y0M0DT5H31M52S', 0);
00032 
00033 echo "test_time_fall_type3_prev_type3_redodt: ";
00034 $end   = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00035 $end->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00036 $start = new DateTime('2010-11-06 18:38:28');  // prev, zt3
00037 examine_diff($end, $start, 'P+0Y0M0DT6H34M5S', 0);
00038 
00039 echo "test_time_fall_type3_prev_type3_redost: ";
00040 $end   = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00041 $end->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00042 $start = new DateTime('2010-11-06 18:38:28');  // prev, zt3
00043 examine_diff($end, $start, 'P+0Y0M0DT7H36M16S', 0);
00044 
00045 echo "test_time_fall_type3_prev_type3_st: ";
00046 $end   = new DateTime('2010-11-07 03:16:55');  // st, zt3
00047 $start = new DateTime('2010-11-06 18:38:28');  // prev, zt3
00048 examine_diff($end, $start, 'P+0Y0M0DT9H38M27S', 0);
00049 
00050 echo "test_time_fall_type3_prev_type3_post: ";
00051 $end   = new DateTime('2010-11-08 19:59:59');  // post, zt3
00052 $start = new DateTime('2010-11-06 18:38:28');  // prev, zt3
00053 examine_diff($end, $start, 'P+0Y0M2DT1H21M31S', 2);
00054 
00055 echo "test_time_fall_type3_dt_type3_prev: ";
00056 $end   = new DateTime('2010-11-06 18:38:28');  // prev, zt3
00057 $start = new DateTime('2010-11-07 00:10:20');  // dt, zt3
00058 examine_diff($end, $start, 'P-0Y0M0DT5H31M52S', 0);
00059 
00060 echo "test_time_fall_type3_dt_type3_dt: ";
00061 $end   = new DateTime('2010-11-07 00:15:35');  // sp dt, zt3
00062 $start = new DateTime('2010-11-07 00:10:20');  // dt, zt3
00063 examine_diff($end, $start, 'P+0Y0M0DT0H5M15S', 0);
00064 
00065 echo "test_time_fall_type3_dt_type3_redodt: ";
00066 $end   = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00067 $end->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00068 $start = new DateTime('2010-11-07 00:10:20');  // dt, zt3
00069 examine_diff($end, $start, 'P+0Y0M0DT1H2M13S', 0);
00070 
00071 echo "test_time_fall_type3_dt_type3_redost: ";
00072 $end   = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00073 $end->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00074 $start = new DateTime('2010-11-07 00:10:20');  // dt, zt3
00075 examine_diff($end, $start, 'P+0Y0M0DT2H4M24S', 0);
00076 
00077 echo "test_time_fall_type3_dt_type3_st: ";
00078 $end   = new DateTime('2010-11-07 03:16:55');  // st, zt3
00079 $start = new DateTime('2010-11-07 00:10:20');  // dt, zt3
00080 examine_diff($end, $start, 'P+0Y0M0DT4H6M35S', 0);
00081 
00082 echo "test_time_fall_type3_dt_type3_post: ";
00083 $end   = new DateTime('2010-11-08 19:59:59');  // post, zt3
00084 $start = new DateTime('2010-11-07 00:10:20');  // dt, zt3
00085 examine_diff($end, $start, 'P+0Y0M1DT20H49M39S', 1);
00086 
00087 echo "test_time_fall_type3_redodt_type3_prev: ";
00088 $end   = new DateTime('2010-11-06 18:38:28');  // prev, zt3
00089 $start = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00090 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00091 examine_diff($end, $start, 'P-0Y0M0DT6H34M5S', 0);
00092 
00093 echo "test_time_fall_type3_redodt_type3_dt: ";
00094 $end   = new DateTime('2010-11-07 00:10:20');  // dt, zt3
00095 $start = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00096 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00097 examine_diff($end, $start, 'P-0Y0M0DT1H2M13S', 0);
00098 
00099 echo "test_time_fall_type3_redodt_type3_redodt: ";
00100 $end   = new DateTime('2010-11-07 01:15:35 EDT');  // sp redodt, zt2
00101 $end->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00102 $start = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00103 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00104 examine_diff($end, $start, 'P+0Y0M0DT0H3M2S', 0);
00105 
00106 echo "test_time_fall_type3_redodt_type3_redost: ";
00107 $end   = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00108 $end->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00109 $start = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00110 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00111 examine_diff($end, $start, 'P+0Y0M0DT1H2M11S', 0);
00112 
00113 echo "test_time_fall_type3_redodt_type3_st: ";
00114 $end   = new DateTime('2010-11-07 03:16:55');  // st, zt3
00115 $start = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00116 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00117 examine_diff($end, $start, 'P+0Y0M0DT3H4M22S', 0);
00118 
00119 echo "test_time_fall_type3_redodt_type3_post: ";
00120 $end   = new DateTime('2010-11-08 19:59:59');  // post, zt3
00121 $start = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00122 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00123 examine_diff($end, $start, 'P+0Y0M1DT19H47M26S', 1);
00124 
00125 echo "test_time_fall_type3_redost_type3_prev: ";
00126 $end   = new DateTime('2010-11-06 18:38:28');  // prev, zt3
00127 $start = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00128 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00129 examine_diff($end, $start, 'P-0Y0M0DT7H36M16S', 0);
00130 
00131 echo "test_time_fall_type3_redost_type3_dt: ";
00132 $end   = new DateTime('2010-11-07 00:10:20');  // dt, zt3
00133 $start = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00134 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00135 examine_diff($end, $start, 'P-0Y0M0DT2H4M24S', 0);
00136 
00137 echo "test_time_fall_type3_redost_type3_redodt: ";
00138 $end   = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00139 $end->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00140 $start = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00141 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00142 examine_diff($end, $start, 'P-0Y0M0DT1H2M11S', 0);
00143 
00144 echo "test_time_fall_type3_redost_type3_redost: ";
00145 $end   = new DateTime('2010-11-07 01:16:54 EST');  // sp redodt, zt2
00146 $end->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00147 $start = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00148 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00149 examine_diff($end, $start, 'P+0Y0M0DT0H2M10S', 0);
00150 
00151 echo "test_time_fall_type3_redost_type3_st: ";
00152 $end   = new DateTime('2010-11-07 03:16:55');  // st, zt3
00153 $start = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00154 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00155 examine_diff($end, $start, 'P+0Y0M0DT2H2M11S', 0);
00156 
00157 echo "test_time_fall_type3_redost_type3_post: ";
00158 $end   = new DateTime('2010-11-08 19:59:59');  // post, zt3
00159 $start = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00160 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00161 examine_diff($end, $start, 'P+0Y0M1DT18H45M15S', 1);
00162 
00163 echo "test_time_fall_type3_st_type3_prev: ";
00164 $end   = new DateTime('2010-11-06 18:38:28');  // prev, zt3
00165 $start = new DateTime('2010-11-07 03:16:55');  // st, zt3
00166 examine_diff($end, $start, 'P-0Y0M0DT9H38M27S', 0);
00167 
00168 echo "test_time_fall_type3_st_type3_dt: ";
00169 $end   = new DateTime('2010-11-07 00:10:20');  // dt, zt3
00170 $start = new DateTime('2010-11-07 03:16:55');  // st, zt3
00171 examine_diff($end, $start, 'P-0Y0M0DT4H6M35S', 0);
00172 
00173 echo "test_time_fall_type3_st_type3_redodt: ";
00174 $end   = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00175 $end->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00176 $start = new DateTime('2010-11-07 03:16:55');  // st, zt3
00177 examine_diff($end, $start, 'P-0Y0M0DT3H4M22S', 0);
00178 
00179 echo "test_time_fall_type3_st_type3_redost: ";
00180 $end   = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00181 $end->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00182 $start = new DateTime('2010-11-07 03:16:55');  // st, zt3
00183 examine_diff($end, $start, 'P-0Y0M0DT2H2M11S', 0);
00184 
00185 echo "test_time_fall_type3_st_type3_st: ";
00186 $end   = new DateTime('2010-11-07 05:19:56');  // sp st, zt3
00187 $start = new DateTime('2010-11-07 03:16:55');  // st, zt3
00188 examine_diff($end, $start, 'P+0Y0M0DT2H3M1S', 0);
00189 
00190 echo "test_time_fall_type3_st_type3_post: ";
00191 $end   = new DateTime('2010-11-08 19:59:59');  // post, zt3
00192 $start = new DateTime('2010-11-07 03:16:55');  // st, zt3
00193 examine_diff($end, $start, 'P+0Y0M1DT16H43M4S', 1);
00194 
00195 echo "test_time_fall_type3_post_type3_prev: ";
00196 $end   = new DateTime('2010-11-06 18:38:28');  // prev, zt3
00197 $start = new DateTime('2010-11-08 19:59:59');  // post, zt3
00198 examine_diff($end, $start, 'P-0Y0M2DT1H21M31S', 2);
00199 
00200 echo "test_time_fall_type3_post_type3_dt: ";
00201 $end   = new DateTime('2010-11-07 00:10:20');  // dt, zt3
00202 $start = new DateTime('2010-11-08 19:59:59');  // post, zt3
00203 examine_diff($end, $start, 'P-0Y0M1DT20H49M39S', 1);
00204 
00205 echo "test_time_fall_type3_post_type3_redodt: ";
00206 $end   = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00207 $end->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00208 $start = new DateTime('2010-11-08 19:59:59');  // post, zt3
00209 examine_diff($end, $start, 'P-0Y0M1DT19H47M26S', 1);
00210 
00211 echo "test_time_fall_type3_post_type3_redost: ";
00212 $end   = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00213 $end->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00214 $start = new DateTime('2010-11-08 19:59:59');  // post, zt3
00215 examine_diff($end, $start, 'P-0Y0M1DT18H45M15S', 1);
00216 
00217 echo "test_time_fall_type3_post_type3_st: ";
00218 $end   = new DateTime('2010-11-07 03:16:55');  // st, zt3
00219 $start = new DateTime('2010-11-08 19:59:59');  // post, zt3
00220 examine_diff($end, $start, 'P-0Y0M1DT16H43M4S', 1);
00221 
00222 echo "test_time_fall_type3_post_type3_post: ";
00223 $end   = new DateTime('2010-11-08 19:59:59');  // post, zt3
00224 $start = new DateTime('2010-11-08 18:57:55');  // sp post, zt3
00225 examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0);
00226 
00227 echo "test_time_fall_type3_dtsec_type3_stsec: ";
00228 $end   = new DateTime('2010-11-07 01:00:00 EST');  // stsec, zt2
00229 $end->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00230 $start = new DateTime('2010-11-07 01:59:59 EDT');  // dtsec, zt2
00231 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00232 examine_diff($end, $start, 'P+0Y0M0DT0H0M1S', 0);
00233 
00234 echo "test_time_fall_type3_stsec_type3_dtsec: ";
00235 $end   = new DateTime('2010-11-07 01:59:59 EDT');  // dtsec, zt2
00236 $end->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00237 $start = new DateTime('2010-11-07 01:00:00 EST');  // stsec, zt2
00238 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00239 examine_diff($end, $start, 'P-0Y0M0DT0H0M1S', 0);