Back to index

php5  5.3.10
DateTime_data-fall-type3-type2.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 2
00013  *
00014  * + prev: the day before the transition day  2010-11-06 18:38:28 EDT
00015  * + dt: daylight time on transition day      2010-11-07 00:10:20 EDT
00016  * + redodt: daylight time in the redo period 2010-11-07 01:12:33 EDT
00017  * + redost: standard time in the redo period 2010-11-07 01:14:44 EST
00018  * + st: standard time on the transition day  2010-11-07 03:16:55 EST
00019  * + post: the day after the transition day   2010-11-08 19:59:59 EST
00020  * + dtsec: daylight time 1 sec before change 2010-11-07 01:59:59 EDT
00021  * + stsec: standard time first second        2010-11-07 01:00:00 EST
00022  */
00023 echo "test_time_fall_type3_prev_type2_prev: ";
00024 $end   = new DateTime('2010-11-06 18:38:28 EDT');  // prev, zt2
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_type2_dt: ";
00029 $end   = new DateTime('2010-11-07 00:10:20 EDT');  // dt, zt2
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_type2_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_type2_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_type2_st: ";
00046 $end   = new DateTime('2010-11-07 03:16:55 EST');  // st, zt2
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_type2_post: ";
00051 $end   = new DateTime('2010-11-08 19:59:59 EST');  // post, zt2
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_type2_prev: ";
00056 $end   = new DateTime('2010-11-06 18:38:28 EDT');  // prev, zt2
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_type2_dt: ";
00061 $end   = new DateTime('2010-11-07 00:15:35 EDT');  // sp dt, zt2
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_type2_redodt: ";
00066 $end   = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00067 $start = new DateTime('2010-11-07 00:10:20');  // dt, zt3
00068 examine_diff($end, $start, 'P+0Y0M0DT1H2M13S', 0);
00069 
00070 echo "test_time_fall_type3_dt_type2_redost: ";
00071 $end   = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00072 $start = new DateTime('2010-11-07 00:10:20');  // dt, zt3
00073 examine_diff($end, $start, 'P+0Y0M0DT2H4M24S', 0);
00074 
00075 echo "test_time_fall_type3_dt_type2_st: ";
00076 $end   = new DateTime('2010-11-07 03:16:55 EST');  // st, zt2
00077 $start = new DateTime('2010-11-07 00:10:20');  // dt, zt3
00078 examine_diff($end, $start, 'P+0Y0M0DT4H6M35S', 0);
00079 
00080 echo "test_time_fall_type3_dt_type2_post: ";
00081 $end   = new DateTime('2010-11-08 19:59:59 EST');  // post, zt2
00082 $start = new DateTime('2010-11-07 00:10:20');  // dt, zt3
00083 examine_diff($end, $start, 'P+0Y0M1DT20H49M39S', 1);
00084 
00085 echo "test_time_fall_type3_redodt_type2_prev: ";
00086 $end   = new DateTime('2010-11-06 18:38:28 EDT');  // prev, zt2
00087 $start = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00088 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00089 examine_diff($end, $start, 'P-0Y0M0DT6H34M5S', 0);
00090 
00091 echo "test_time_fall_type3_redodt_type2_dt: ";
00092 $end   = new DateTime('2010-11-07 00:10:20 EDT');  // dt, zt2
00093 $start = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00094 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00095 examine_diff($end, $start, 'P-0Y0M0DT1H2M13S', 0);
00096 
00097 echo "test_time_fall_type3_redodt_type2_redodt: ";
00098 $end   = new DateTime('2010-11-07 01:15:35 EDT');  // sp redodt, zt2
00099 $start = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00100 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00101 examine_diff($end, $start, 'P+0Y0M0DT0H3M2S', 0);
00102 
00103 echo "test_time_fall_type3_redodt_type2_redost: ";
00104 $end   = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00105 $start = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00106 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00107 examine_diff($end, $start, 'P+0Y0M0DT1H2M11S', 0);
00108 
00109 echo "test_time_fall_type3_redodt_type2_st: ";
00110 $end   = new DateTime('2010-11-07 03:16:55 EST');  // st, zt2
00111 $start = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00112 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00113 examine_diff($end, $start, 'P+0Y0M0DT3H4M22S', 0);
00114 
00115 echo "test_time_fall_type3_redodt_type2_post: ";
00116 $end   = new DateTime('2010-11-08 19:59:59 EST');  // post, zt2
00117 $start = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00118 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00119 examine_diff($end, $start, 'P+0Y0M1DT19H47M26S', 1);
00120 
00121 echo "test_time_fall_type3_redost_type2_prev: ";
00122 $end   = new DateTime('2010-11-06 18:38:28 EDT');  // prev, zt2
00123 $start = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00124 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00125 examine_diff($end, $start, 'P-0Y0M0DT7H36M16S', 0);
00126 
00127 echo "test_time_fall_type3_redost_type2_dt: ";
00128 $end   = new DateTime('2010-11-07 00:10:20 EDT');  // dt, zt2
00129 $start = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00130 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00131 examine_diff($end, $start, 'P-0Y0M0DT2H4M24S', 0);
00132 
00133 echo "test_time_fall_type3_redost_type2_redodt: ";
00134 $end   = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00135 $start = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00136 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00137 examine_diff($end, $start, 'P-0Y0M0DT1H2M11S', 0);
00138 
00139 echo "test_time_fall_type3_redost_type2_redost: ";
00140 $end   = new DateTime('2010-11-07 01:16:54 EST');  // sp redodt, zt2
00141 $start = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00142 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00143 examine_diff($end, $start, 'P+0Y0M0DT0H2M10S', 0);
00144 
00145 echo "test_time_fall_type3_redost_type2_st: ";
00146 $end   = new DateTime('2010-11-07 03:16:55 EST');  // st, zt2
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+0Y0M0DT2H2M11S', 0);
00150 
00151 echo "test_time_fall_type3_redost_type2_post: ";
00152 $end   = new DateTime('2010-11-08 19:59:59 EST');  // post, zt2
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+0Y0M1DT18H45M15S', 1);
00156 
00157 echo "test_time_fall_type3_st_type2_prev: ";
00158 $end   = new DateTime('2010-11-06 18:38:28 EDT');  // prev, zt2
00159 $start = new DateTime('2010-11-07 03:16:55');  // st, zt3
00160 examine_diff($end, $start, 'P-0Y0M0DT9H38M27S', 0);
00161 
00162 echo "test_time_fall_type3_st_type2_dt: ";
00163 $end   = new DateTime('2010-11-07 00:10:20 EDT');  // dt, zt2
00164 $start = new DateTime('2010-11-07 03:16:55');  // st, zt3
00165 examine_diff($end, $start, 'P-0Y0M0DT4H6M35S', 0);
00166 
00167 echo "test_time_fall_type3_st_type2_redodt: ";
00168 $end   = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00169 $start = new DateTime('2010-11-07 03:16:55');  // st, zt3
00170 examine_diff($end, $start, 'P-0Y0M0DT3H4M22S', 0);
00171 
00172 echo "test_time_fall_type3_st_type2_redost: ";
00173 $end   = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00174 $start = new DateTime('2010-11-07 03:16:55');  // st, zt3
00175 examine_diff($end, $start, 'P-0Y0M0DT2H2M11S', 0);
00176 
00177 echo "test_time_fall_type3_st_type2_st: ";
00178 $end   = new DateTime('2010-11-07 05:19:56 EST');  // sp st, zt2
00179 $start = new DateTime('2010-11-07 03:16:55');  // st, zt3
00180 examine_diff($end, $start, 'P+0Y0M0DT2H3M1S', 0);
00181 
00182 echo "test_time_fall_type3_st_type2_post: ";
00183 $end   = new DateTime('2010-11-08 19:59:59 EST');  // post, zt2
00184 $start = new DateTime('2010-11-07 03:16:55');  // st, zt3
00185 examine_diff($end, $start, 'P+0Y0M1DT16H43M4S', 1);
00186 
00187 echo "test_time_fall_type3_post_type2_prev: ";
00188 $end   = new DateTime('2010-11-06 18:38:28 EDT');  // prev, zt2
00189 $start = new DateTime('2010-11-08 19:59:59');  // post, zt3
00190 examine_diff($end, $start, 'P-0Y0M2DT1H21M31S', 2);
00191 
00192 echo "test_time_fall_type3_post_type2_dt: ";
00193 $end   = new DateTime('2010-11-07 00:10:20 EDT');  // dt, zt2
00194 $start = new DateTime('2010-11-08 19:59:59');  // post, zt3
00195 examine_diff($end, $start, 'P-0Y0M1DT20H49M39S', 1);
00196 
00197 echo "test_time_fall_type3_post_type2_redodt: ";
00198 $end   = new DateTime('2010-11-07 01:12:33 EDT');  // redodt, zt2
00199 $start = new DateTime('2010-11-08 19:59:59');  // post, zt3
00200 examine_diff($end, $start, 'P-0Y0M1DT19H47M26S', 1);
00201 
00202 echo "test_time_fall_type3_post_type2_redost: ";
00203 $end   = new DateTime('2010-11-07 01:14:44 EST');  // redost, zt2
00204 $start = new DateTime('2010-11-08 19:59:59');  // post, zt3
00205 examine_diff($end, $start, 'P-0Y0M1DT18H45M15S', 1);
00206 
00207 echo "test_time_fall_type3_post_type2_st: ";
00208 $end   = new DateTime('2010-11-07 03:16:55 EST');  // st, zt2
00209 $start = new DateTime('2010-11-08 19:59:59');  // post, zt3
00210 examine_diff($end, $start, 'P-0Y0M1DT16H43M4S', 1);
00211 
00212 echo "test_time_fall_type3_post_type2_post: ";
00213 $end   = new DateTime('2010-11-08 19:59:59 EST');  // post, zt2
00214 $start = new DateTime('2010-11-08 18:57:55');  // sp post, zt3
00215 examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0);
00216 
00217 echo "test_time_fall_type3_dtsec_type2_stsec: ";
00218 $end   = new DateTime('2010-11-07 01:00:00 EST');  // stsec, zt2
00219 $start = new DateTime('2010-11-07 01:59:59 EDT');  // dtsec, zt2
00220 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00221 examine_diff($end, $start, 'P+0Y0M0DT0H0M1S', 0);
00222 
00223 echo "test_time_fall_type3_stsec_type2_dtsec: ";
00224 $end   = new DateTime('2010-11-07 01:59:59 EDT');  // dtsec, zt2
00225 $start = new DateTime('2010-11-07 01:00:00 EST');  // stsec, zt2
00226 $start->setTimezone(new DateTimeZone('America/New_York'));  // zt2 -> zt3
00227 examine_diff($end, $start, 'P-0Y0M0DT0H0M1S', 0);