[PHP-CVS] cvs: php-src /ext/date/tests bug32086.phpt bug32555.phpt
by Derick Rethans other posts by this author
Jun 18 2005 12:21PM messages near this date
[PHP-CVS] cvs: php-src /ext/date/lib parse_tz.c timelib_structs.h tm2unixtime.c
|
[PHP-CVS] cvs: php-src / NEWS
derick Sat Jun 18 15:21:10 2005 EDT
Modified files:
/php-src/ext/date/tests bug32086.phpt bug32555.phpt
Log:
- Expand test cases for bug #32086 and #32555.
http://cvs.php.net/diff.php/php-src/ext/date/tests/bug32086.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/ext/date/tests/bug32086.phpt
diff -u php-src/ext/date/tests/bug32086.phpt:1.1 php-src/ext/date/tests/bug32086.phpt:1.2
--- php-src/ext/date/tests/bug32086.phpt:1.1 Fri Jun 17 10:21:53 2005
+++ php-src/ext/date/tests/bug32086.phpt Sat Jun 18 15:21:10 2005
@@ -3,13 +3,47 @@
--FILE--
<?php
putenv("TZ=America/Sao_Paulo");
-echo $i = strtotime("2004-11-01"), "\n";
-echo strtotime("+1 day", $i), "\n";
-echo $i = strtotime("2005-02-19"), "\n";
-echo strtotime("+1 day", $i), "\n";
+echo $g = strtotime("2004-11-01"), "\n";
+echo $i = strtotime("2004-11-01 +1 day"), "\n";
+echo $j = strtotime("+1 day", $g), "\n";
+echo $k = strtotime("2004-11-02"), "\n";
+echo $l = strtotime("2004-11-03"), "\n";
+echo date("Y-m-d H:i:s T\n", $g);
+echo date("Y-m-d H:i:s T\n", $i);
+echo date("Y-m-d H:i:s T\n", $j);
+echo date("Y-m-d H:i:s T\n", $k);
+echo date("Y-m-d H:i:s T\n", $l);
+
+echo $g = strtotime("2005-02-19"), "\n";
+echo $i = strtotime("2005-02-19 +1 day"), "\n";
+echo $j = strtotime("+1 day", $g), "\n";
+echo $k = strtotime("2005-02-20"), "\n";
+echo $l = strtotime("2005-02-21"), "\n";
+echo date("Y-m-d H:i:s T\n", $g);
+echo date("Y-m-d H:i:s T\n", $i);
+echo date("Y-m-d H:i:s T\n", $j);
+echo date("Y-m-d H:i:s T\n", $k);
+echo date("Y-m-d H:i:s T\n", $l);
+
?>
--EXPECT--
1099278000
-1099360800
+1099364400
+1099364400
+1099364400
+1099447200
+2004-11-01 00:00:00 BRT
+2004-11-02 01:00:00 BRST
+2004-11-02 01:00:00 BRST
+2004-11-02 01:00:00 BRST
+2004-11-03 00:00:00 BRST
1108778400
1108868400
+1108868400
+1108868400
+1108954800
+2005-02-19 00:00:00 BRST
+2005-02-20 00:00:00 BRT
+2005-02-20 00:00:00 BRT
+2005-02-20 00:00:00 BRT
+2005-02-21 00:00:00 BRT
http://cvs.php.net/diff.php/php-src/ext/date/tests/bug32555.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/ext/date/tests/bug32555.phpt
diff -u php-src/ext/date/tests/bug32555.phpt:1.1 php-src/ext/date/tests/bug32555.phpt:1.2
--- php-src/ext/date/tests/bug32555.phpt:1.1 Fri Jun 17 10:21:53 2005
+++ php-src/ext/date/tests/bug32555.phpt Sat Jun 18 15:21:10 2005
@@ -7,7 +7,11 @@
$stamp = 1112427000;
print strftime('%c %Z',strtotime('now',$stamp)) ."\n";
print strftime('%c %Z',strtotime('tomorrow',$stamp)) ."\n";
+print strftime('%c %Z',strtotime('+1 day',$stamp)) ."\n";
+print strftime('%c %Z',strtotime('+2 day',$stamp)) ."\n";
?>
--EXPECT--
Sat Apr 2 02:30:00 2005 EST
Sun Apr 3 00:00:00 2005 EST
+Sun Apr 3 03:30:00 2005 EDT
+Mon Apr 4 02:30:00 2005 EDT
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|