Back to index

php5  5.3.10
DateTime_data-spring-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, Spring, Zone Type 3 to Zone Type 3
00013  *
00014  * + prev: the day before the transition day  2010-03-13 18:38:28
00015  * + st: standard time on transition day      2010-03-14 00:10:20
00016  * + dt: daylight time on the transition day  2010-03-14 03:16:55
00017  * + post: the day after the transition day   2010-03-15 19:59:59
00018  * + stsec: standard time 1 sec before change 2010-03-14 01:59:59
00019  * + dtsec: daylight time first second        2010-03-14 03:00:00
00020  */
00021 echo "test_time_spring_type3_prev_type3_prev: ";
00022 $end   = new DateTime('2010-03-13 18:38:28');  // prev, zt3
00023 $start = new DateTime('2010-02-11 02:18:48');  // sp prev, zt3
00024 examine_diff($end, $start, 'P+0Y1M2DT16H19M40S', 30);
00025 
00026 echo "test_time_spring_type3_prev_type3_st: ";
00027 $end   = new DateTime('2010-03-14 00:10:20');  // st, zt3
00028 $start = new DateTime('2010-03-13 18:38:28');  // prev, zt3
00029 examine_diff($end, $start, 'P+0Y0M0DT5H31M52S', 0);
00030 
00031 echo "test_time_spring_type3_prev_type3_dt: ";
00032 $end   = new DateTime('2010-03-14 03:16:55');  // dt, zt3
00033 $start = new DateTime('2010-03-13 18:38:28');  // prev, zt3
00034 examine_diff($end, $start, 'P+0Y0M0DT7H38M27S', 0);
00035 
00036 echo "test_time_spring_type3_prev_type3_post: ";
00037 $end   = new DateTime('2010-03-15 19:59:59');  // post, zt3
00038 $start = new DateTime('2010-03-13 18:38:28');  // prev, zt3
00039 examine_diff($end, $start, 'P+0Y0M2DT1H21M31S', 2);
00040 
00041 echo "test_time_spring_type3_st_type3_prev: ";
00042 $end   = new DateTime('2010-03-13 18:38:28');  // prev, zt3
00043 $start = new DateTime('2010-03-14 00:10:20');  // st, zt3
00044 examine_diff($end, $start, 'P-0Y0M0DT5H31M52S', 0);
00045 
00046 echo "test_time_spring_type3_st_type3_st: ";
00047 $end   = new DateTime('2010-03-14 00:15:35');  // sp st, zt3
00048 $start = new DateTime('2010-03-14 00:10:20');  // st, zt3
00049 examine_diff($end, $start, 'P+0Y0M0DT0H5M15S', 0);
00050 
00051 echo "test_time_spring_type3_st_type3_dt: ";
00052 $end   = new DateTime('2010-03-14 03:16:55');  // dt, zt3
00053 $start = new DateTime('2010-03-14 00:10:20');  // st, zt3
00054 examine_diff($end, $start, 'P+0Y0M0DT2H6M35S', 0);
00055 
00056 echo "test_time_spring_type3_st_type3_post: ";
00057 $end   = new DateTime('2010-03-15 19:59:59');  // post, zt3
00058 $start = new DateTime('2010-03-14 00:10:20');  // st, zt3
00059 examine_diff($end, $start, 'P+0Y0M1DT18H49M39S', 1);
00060 
00061 echo "test_time_spring_type3_dt_type3_prev: ";
00062 $end   = new DateTime('2010-03-13 18:38:28');  // prev, zt3
00063 $start = new DateTime('2010-03-14 03:16:55');  // dt, zt3
00064 examine_diff($end, $start, 'P-0Y0M0DT7H38M27S', 0);
00065 
00066 echo "test_time_spring_type3_dt_type3_st: ";
00067 $end   = new DateTime('2010-03-14 00:10:20');  // st, zt3
00068 $start = new DateTime('2010-03-14 03:16:55');  // dt, zt3
00069 examine_diff($end, $start, 'P-0Y0M0DT2H6M35S', 0);
00070 
00071 echo "test_time_spring_type3_dt_type3_dt: ";
00072 $end   = new DateTime('2010-03-14 05:19:56');  // sp dt, zt3
00073 $start = new DateTime('2010-03-14 03:16:55');  // dt, zt3
00074 examine_diff($end, $start, 'P+0Y0M0DT2H3M1S', 0);
00075 
00076 echo "test_time_spring_type3_dt_type3_post: ";
00077 $end   = new DateTime('2010-03-15 19:59:59');  // post, zt3
00078 $start = new DateTime('2010-03-14 03:16:55');  // dt, zt3
00079 examine_diff($end, $start, 'P+0Y0M1DT16H43M4S', 1);
00080 
00081 echo "test_time_spring_type3_post_type3_prev: ";
00082 $end   = new DateTime('2010-03-13 18:38:28');  // prev, zt3
00083 $start = new DateTime('2010-03-15 19:59:59');  // post, zt3
00084 examine_diff($end, $start, 'P-0Y0M2DT1H21M31S', 2);
00085 
00086 echo "test_time_spring_type3_post_type3_st: ";
00087 $end   = new DateTime('2010-03-14 00:10:20');  // st, zt3
00088 $start = new DateTime('2010-03-15 19:59:59');  // post, zt3
00089 examine_diff($end, $start, 'P-0Y0M1DT18H49M39S', 1);
00090 
00091 echo "test_time_spring_type3_post_type3_dt: ";
00092 $end   = new DateTime('2010-03-14 03:16:55');  // dt, zt3
00093 $start = new DateTime('2010-03-15 19:59:59');  // post, zt3
00094 examine_diff($end, $start, 'P-0Y0M1DT16H43M4S', 1);
00095 
00096 echo "test_time_spring_type3_post_type3_post: ";
00097 $end   = new DateTime('2010-03-15 19:59:59');  // post, zt3
00098 $start = new DateTime('2010-03-15 18:57:55');  // sp post, zt3
00099 examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0);
00100 
00101 echo "test_time_spring_type3_stsec_type3_dtsec: ";
00102 $end   = new DateTime('2010-03-14 03:00:00');  // dtsec, zt3
00103 $start = new DateTime('2010-03-14 01:59:59');  // stsec, zt3
00104 examine_diff($end, $start, 'P+0Y0M0DT0H0M1S', 0);
00105 
00106 echo "test_time_spring_type3_dtsec_type3_stsec: ";
00107 $end   = new DateTime('2010-03-14 01:59:59');  // stsec, zt3
00108 $start = new DateTime('2010-03-14 03:00:00');  // dtsec, zt3
00109 examine_diff($end, $start, 'P-0Y0M0DT0H0M1S', 0);