Deleted: php/php-src/branches/PHP_5_3/ext/date/tests/bug.add.zone2.phpt =================================================================== --- php/php-src/branches/PHP_5_3/ext/date/tests/bug.add.zone2.phpt 2011-07-20 17:40:18 UTC (rev 313483) +++ php/php-src/branches/PHP_5_3/ext/date/tests/bug.add.zone2.phpt 2011-07-20 18:24:14 UTC (rev 313484) @@ -1,33 +0,0 @@ ---TEST-- -DateTime::add() mistakenly modifies objects having zone type 2 ---CREDITS-- -Daniel Convissor ---XFAIL-- -Bug exists ---FILE-- -format('Y-m-d H:i:s T') . "\n"; -echo 'Zone Type 2: ' . $date2->format('Y-m-d H:i:s T') . "\n"; - -echo $interval->format('Add %h hours %i minutes') . "\n"; -$date3->add($interval); -$date2->add($interval); - -echo 'Zone Type 3: ' . $date3->format('Y-m-d H:i:s T') . "\n"; -echo 'Zone Type 2: ' . $date2->format('Y-m-d H:i:s T') . "\n"; - -?> ---EXPECT-- -Zone Type 3: 2010-10-04 02:18:48 EDT -Zone Type 2: 2010-10-04 02:18:48 EDT -Add 2 hours 1 minutes -Zone Type 3: 2010-10-04 04:19:48 EDT -Zone Type 2: 2010-10-04 04:19:48 EDT Copied: php/php-src/branches/PHP_5_3/ext/date/tests/bug55253.phpt (from rev 312286, php/php-src/branches/PHP_5_3/ext/date/tests/bug.add.zone2.phpt) =================================================================== --- php/php-src/branches/PHP_5_3/ext/date/tests/bug55253.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/date/tests/bug55253.phpt 2011-07-20 18:24:14 UTC (rev 313484) @@ -0,0 +1,47 @@ +--TEST-- +DateTime::add() and sub() result -1 hour on objects with time zone type 2 +--CREDITS-- +Daniel Convissor +--XFAIL-- +Bug 55253 exists +--FILE-- +format('Y-m-d H:i:s T') . "\n"; +echo 'Zone Type 2: ' . $date2->format('Y-m-d H:i:s T') . "\n"; + +echo $interval->format('Add %h hours %i minutes') . "\n"; +$date3->add($interval); +$date2->add($interval); + +echo 'Zone Type 3: ' . $date3->format('Y-m-d H:i:s T') . "\n"; +echo 'Zone Type 2: ' . $date2->format('Y-m-d H:i:s T') . "\n"; + +// Try subtracting from expected result. +$date3 = new DateTime('2010-10-04 04:19:48'); +$date2 = new DateTime('2010-10-04 04:19:48 EDT'); + +echo $interval->format('Subtract %h hours %i minutes from expected') . "\n"; +$date3->sub($interval); +$date2->sub($interval); + +echo 'Zone Type 3: ' . $date3->format('Y-m-d H:i:s T') . "\n"; +echo 'Zone Type 2: ' . $date2->format('Y-m-d H:i:s T') . "\n"; + +?> +--EXPECT-- +Zone Type 3: 2010-10-04 02:18:48 EDT +Zone Type 2: 2010-10-04 02:18:48 EDT +Add 2 hours 1 minutes +Zone Type 3: 2010-10-04 04:19:48 EDT +Zone Type 2: 2010-10-04 04:19:48 EDT +Subtract 2 hours 1 minutes from expected +Zone Type 3: 2010-10-04 02:18:48 EDT +Zone Type 2: 2010-10-04 02:18:48 EDT Deleted: php/php-src/branches/PHP_5_4/ext/date/tests/bug.add.zone2.phpt =================================================================== --- php/php-src/branches/PHP_5_4/ext/date/tests/bug.add.zone2.phpt 2011-07-20 17:40:18 UTC (rev 313483) +++ php/php-src/branches/PHP_5_4/ext/date/tests/bug.add.zone2.phpt 2011-07-20 18:24:14 UTC (rev 313484) @@ -1,33 +0,0 @@ ---TEST-- -DateTime::add() mistakenly modifies objects having zone type 2 ---CREDITS-- -Daniel Convissor ---XFAIL-- -Bug exists ---FILE-- -format('Y-m-d H:i:s T') . "\n"; -echo 'Zone Type 2: ' . $date2->format('Y-m-d H:i:s T') . "\n"; - -echo $interval->format('Add %h hours %i minutes') . "\n"; -$date3->add($interval); -$date2->add($interval); - -echo 'Zone Type 3: ' . $date3->format('Y-m-d H:i:s T') . "\n"; -echo 'Zone Type 2: ' . $date2->format('Y-m-d H:i:s T') . "\n"; - -?> ---EXPECT-- -Zone Type 3: 2010-10-04 02:18:48 EDT -Zone Type 2: 2010-10-04 02:18:48 EDT -Add 2 hours 1 minutes -Zone Type 3: 2010-10-04 04:19:48 EDT -Zone Type 2: 2010-10-04 04:19:48 EDT Copied: php/php-src/branches/PHP_5_4/ext/date/tests/bug55253.phpt (from rev 313482, php/php-src/branches/PHP_5_4/ext/date/tests/bug.add.zone2.phpt) =================================================================== --- php/php-src/branches/PHP_5_4/ext/date/tests/bug55253.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/date/tests/bug55253.phpt 2011-07-20 18:24:14 UTC (rev 313484) @@ -0,0 +1,47 @@ +--TEST-- +DateTime::add() and sub() result -1 hour on objects with time zone type 2 +--CREDITS-- +Daniel Convissor +--XFAIL-- +Bug 55253 exists +--FILE-- +format('Y-m-d H:i:s T') . "\n"; +echo 'Zone Type 2: ' . $date2->format('Y-m-d H:i:s T') . "\n"; + +echo $interval->format('Add %h hours %i minutes') . "\n"; +$date3->add($interval); +$date2->add($interval); + +echo 'Zone Type 3: ' . $date3->format('Y-m-d H:i:s T') . "\n"; +echo 'Zone Type 2: ' . $date2->format('Y-m-d H:i:s T') . "\n"; + +// Try subtracting from expected result. +$date3 = new DateTime('2010-10-04 04:19:48'); +$date2 = new DateTime('2010-10-04 04:19:48 EDT'); + +echo $interval->format('Subtract %h hours %i minutes from expected') . "\n"; +$date3->sub($interval); +$date2->sub($interval); + +echo 'Zone Type 3: ' . $date3->format('Y-m-d H:i:s T') . "\n"; +echo 'Zone Type 2: ' . $date2->format('Y-m-d H:i:s T') . "\n"; + +?> +--EXPECT-- +Zone Type 3: 2010-10-04 02:18:48 EDT +Zone Type 2: 2010-10-04 02:18:48 EDT +Add 2 hours 1 minutes +Zone Type 3: 2010-10-04 04:19:48 EDT +Zone Type 2: 2010-10-04 04:19:48 EDT +Subtract 2 hours 1 minutes from expected +Zone Type 3: 2010-10-04 02:18:48 EDT +Zone Type 2: 2010-10-04 02:18:48 EDT Deleted: php/php-src/trunk/ext/date/tests/bug.add.zone2.phpt =================================================================== --- php/php-src/trunk/ext/date/tests/bug.add.zone2.phpt 2011-07-20 17:40:18 UTC (rev 313483) +++ php/php-src/trunk/ext/date/tests/bug.add.zone2.phpt 2011-07-20 18:24:14 UTC (rev 313484) @@ -1,33 +0,0 @@ ---TEST-- -DateTime::add() mistakenly modifies objects having zone type 2 ---CREDITS-- -Daniel Convissor ---XFAIL-- -Bug exists ---FILE-- -format('Y-m-d H:i:s T') . "\n"; -echo 'Zone Type 2: ' . $date2->format('Y-m-d H:i:s T') . "\n"; - -echo $interval->format('Add %h hours %i minutes') . "\n"; -$date3->add($interval); -$date2->add($interval); - -echo 'Zone Type 3: ' . $date3->format('Y-m-d H:i:s T') . "\n"; -echo 'Zone Type 2: ' . $date2->format('Y-m-d H:i:s T') . "\n"; - -?> ---EXPECT-- -Zone Type 3: 2010-10-04 02:18:48 EDT -Zone Type 2: 2010-10-04 02:18:48 EDT -Add 2 hours 1 minutes -Zone Type 3: 2010-10-04 04:19:48 EDT -Zone Type 2: 2010-10-04 04:19:48 EDT Copied: php/php-src/trunk/ext/date/tests/bug55253.phpt (from rev 312289, php/php-src/trunk/ext/date/tests/bug.add.zone2.phpt) =================================================================== --- php/php-src/trunk/ext/date/tests/bug55253.phpt (rev 0) +++ php/php-src/trunk/ext/date/tests/bug55253.phpt 2011-07-20 18:24:14 UTC (rev 313484) @@ -0,0 +1,47 @@ +--TEST-- +DateTime::add() and sub() result -1 hour on objects with time zone type 2 +--CREDITS-- +Daniel Convissor +--XFAIL-- +Bug 55253 exists +--FILE-- +format('Y-m-d H:i:s T') . "\n"; +echo 'Zone Type 2: ' . $date2->format('Y-m-d H:i:s T') . "\n"; + +echo $interval->format('Add %h hours %i minutes') . "\n"; +$date3->add($interval); +$date2->add($interval); + +echo 'Zone Type 3: ' . $date3->format('Y-m-d H:i:s T') . "\n"; +echo 'Zone Type 2: ' . $date2->format('Y-m-d H:i:s T') . "\n"; + +// Try subtracting from expected result. +$date3 = new DateTime('2010-10-04 04:19:48'); +$date2 = new DateTime('2010-10-04 04:19:48 EDT'); + +echo $interval->format('Subtract %h hours %i minutes from expected') . "\n"; +$date3->sub($interval); +$date2->sub($interval); + +echo 'Zone Type 3: ' . $date3->format('Y-m-d H:i:s T') . "\n"; +echo 'Zone Type 2: ' . $date2->format('Y-m-d H:i:s T') . "\n"; + +?> +--EXPECT-- +Zone Type 3: 2010-10-04 02:18:48 EDT +Zone Type 2: 2010-10-04 02:18:48 EDT +Add 2 hours 1 minutes +Zone Type 3: 2010-10-04 04:19:48 EDT +Zone Type 2: 2010-10-04 04:19:48 EDT +Subtract 2 hours 1 minutes from expected +Zone Type 3: 2010-10-04 02:18:48 EDT +Zone Type 2: 2010-10-04 02:18:48 EDT