com php-src: Group those tests a bit better, as some of the bd ones wanted a "ST" feature that doesn't exist yet.: ext/date/tests/rfc-date
time_and_daylight_saving_time-type3.phpt
| From: | Derick Rethans | Date: | Thu, 28 Nov 2013 12:02:35 +0000 |
| Subject: | com php-src: Group those tests a bit better, as some of the bd ones wanted a "ST" feature that doesn't exist yet.: ext/date/tests/rfc-date time_and_daylight_saving_time-type3.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74135@lists.php.net to get a copy of this message | ||
Commit: 7a0df7be34d35e91406b9654cb7be1de9b8720c1
Author: Derick Rethans <github@derickrethans.nl> Sat, 13 Apr 2013 18:45:51 +0100
Parents: 6e8b2c91c4a9e8ceab5930bbfe6b18cfb9689f3a
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7a0df7be34d35e91406b9654cb7be1de9b8720c1
Log:
Group those tests a bit better, as some of the bd ones wanted a "ST" feature that
doesn't exist yet.
Changed paths:
M ext/date/tests/rfc-datetime_and_daylight_saving_time-type3.phpt
Diff:
diff --git a/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3.phpt
b/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3.phpt
index 855fe4e..15bd0b0 100644
--- a/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3.phpt
+++ b/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3.phpt
@@ -2,8 +2,6 @@
RFC: DateTime and Daylight Saving Time Transitions (zone type 3)
--CREDITS--
Daniel Convissor <danielc@php.net>
---XFAIL--
-RFC not implemented yet
--FILE--
<?php
@@ -155,11 +153,10 @@ $tz = new DateTimeZone('America/New_York');
* Backward Transitions, diff().
*/
-$end = new DateTime('2010-11-07 01:00:00 EST');
-$end->setTimeZone($tz);
-$start = new DateTime('2010-11-07 01:59:59');
+$end = new DateTime('2010-11-07 05:30:00');
+$start = new DateTime('2010-11-06 04:30:00');
echo 'bd1 ' . $end->format($date_format) . ' - ' .
$start->format($date_format)
- . ' = ' . $start->diff($end)->format('PT%hH%iM%sS') . "\n";
+ . ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-11-07 04:30:00');
$start = new DateTime('2010-11-06 04:30:00');
@@ -176,6 +173,19 @@ $start = new DateTime('2010-11-06 04:30:00');
echo 'bd4 ' . $end->format($date_format) . ' - ' .
$start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
+$end = new DateTime('2010-11-07 01:30:00');
+$start = new DateTime('2010-11-06 01:30:00');
+echo 'bd7 ' . $end->format($date_format) . ' - ' .
$start->format($date_format)
+ . ' = ' . $start->diff($end)->format($interval_format) . "\n";
+
+echo "\n";
+
+$end = new DateTime('2010-11-07 05:30:00');
+$end->setTimeZone($tz);
+$start = new DateTime('2010-11-06 04:30:59');
+echo 'bd0 ' . $end->format($date_format) . ' - ' .
$start->format($date_format)
+ . ' = ' . $start->diff($end)->format('PT%hH%iM%sS') . "\n";
+
$end = new DateTime('2010-11-07 01:30:00 EST');
$end->setTimeZone($tz);
$start = new DateTime('2010-11-06 04:30:00');
@@ -188,11 +198,6 @@ $start = new DateTime('2010-11-06 04:30:00');
echo 'bd6 ' . $end->format($date_format) . ' - ' .
$start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
-$end = new DateTime('2010-11-07 01:30:00');
-$start = new DateTime('2010-11-06 01:30:00');
-echo 'bd7 ' . $end->format($date_format) . ' - ' .
$start->format($date_format)
- . ' = ' . $start->diff($end)->format($interval_format) . "\n";
-
$end = new DateTime('2010-11-07 01:30:00 EST');
$end->setTimeZone($tz);
$start = new DateTime('2010-11-06 01:30:00');
@@ -366,13 +371,15 @@ fs5 2010-03-14 01:30:00 EST America/New_York - P1D = 2010-03-13 01:30:00 EST
Ame
fs6 2010-03-15 03:30:00 EDT America/New_York - P1D = 2010-03-14 03:30:00 EDT America/New_York
fs7 2010-03-15 03:30:00 EDT America/New_York - P1D = 2010-03-14 03:30:00 EDT America/New_York
-bd1 2010-11-07 01:00:00 EST America/New_York - 2010-11-07 01:59:59 EDT America/New_York = PT0H0M1S
+bd1 2010-11-07 05:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P1DT1H
bd2 2010-11-07 04:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P1DT0H
bd3 2010-11-07 03:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT24H
bd4 2010-11-07 02:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT23H
+bd7 2010-11-07 01:30:00 EDT America/New_York - 2010-11-06 01:30:00 EDT America/New_York = P1DT0H
+
+bd0 2010-11-07 01:00:00 EST America/New_York - 2010-11-07 01:59:59 EDT America/New_York = PT0H0M1S
bd5 2010-11-07 01:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT22H
bd6 2010-11-07 01:30:00 EDT America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT21H
-bd7 2010-11-07 01:30:00 EDT America/New_York - 2010-11-06 01:30:00 EDT America/New_York = P1DT0H
bd8 2010-11-07 01:30:00 EST America/New_York - 2010-11-06 01:30:00 EDT America/New_York = P1DT1H
ba1 2010-11-07 01:59:59 EDT America/New_York + PT1S = 2010-11-07 01:00:00 EST America/New_York