Lines 134-141
cmp_ok( $dt0->epoch(), 'eq', '1325462340', 'dt_from_string handles seconds with
Link Here
|
134 |
$dt0 = dt_from_string( '2012-01-01t23:59:59.999z', 'rfc3339' ); |
134 |
$dt0 = dt_from_string( '2012-01-01t23:59:59.999z', 'rfc3339' ); |
135 |
cmp_ok( $dt0->epoch(), 'eq', '1325462399', 'dt_from_string handles seconds with 3 decimal places' ); |
135 |
cmp_ok( $dt0->epoch(), 'eq', '1325462399', 'dt_from_string handles seconds with 3 decimal places' ); |
136 |
|
136 |
|
137 |
$dt0 = dt_from_string( '2012-01-01T23:59:59.999Z+02:00', 'rfc3339' ); |
137 |
$dt0 = dt_from_string( '2012-01-01T23:59:59.999+02:00', 'rfc3339' ); |
138 |
cmp_ok( $dt0->epoch(), 'eq', '1325462399', 'dt_from_string handles seconds with 3 decimal places and a timezone' ); |
138 |
cmp_ok( $dt0->epoch(), 'eq', '1325455199', 'dt_from_string handles seconds with 3 decimal places and a timezone' ); |
139 |
|
139 |
|
140 |
# Return undef if passed mysql 0 dates |
140 |
# Return undef if passed mysql 0 dates |
141 |
$dt0 = dt_from_string( '0000-00-00', 'iso' ); |
141 |
$dt0 = dt_from_string( '0000-00-00', 'iso' ); |
142 |
- |
|
|