- Add a couple of test files, which all still fail.

This commit is contained in:
Derick Rethans 2005-06-17 14:21:53 +00:00
parent 65530de209
commit 2492892fde
5 changed files with 89 additions and 0 deletions

View File

@ -0,0 +1,23 @@
--TEST--
Bug #30532 (strtotime - crossing daylight savings time)
--FILE--
<?php
putenv("TZ=America/New_York");
echo date('Y-m-d H:i:s', strtotime('2004-10-31 EDT +1 hour'))."\n";
echo date('Y-m-d H:i:s', strtotime('2004-10-31 EDT +2 hours'))."\n";
echo date('Y-m-d H:i:s', strtotime('2004-10-31 EDT +3 hours'))."\n";
echo "\n";
echo date('Y-m-d H:i:s', strtotime('2004-10-31 +1 hour'))."\n";
echo date('Y-m-d H:i:s', strtotime('2004-10-31 +2 hours'))."\n";
echo date('Y-m-d H:i:s', strtotime('2004-10-31 +3 hours'))."\n";
?>
--EXPECT--
2004-10-31 01:00:00
2004-10-31 01:00:00
2004-10-31 02:00:00
2004-10-31 01:00:00
2004-10-31 01:00:00
2004-10-31 02:00:00

View File

@ -0,0 +1,15 @@
--TEST--
Bug #32086 (strtotime don't work in DST)
--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";
?>
--EXPECT--
1099278000
1099360800
1108778400
1108868400

View File

@ -0,0 +1,25 @@
--TEST--
Bug #32270 (strtotime/date behavior)
--FILE--
<?php
putenv("TZ=America/New_York");
echo date("m/d/Y H:i:s", -2145888000)."\n";
echo strtotime("Jan 1 1902")."\n";
echo date("m/d/Y H:i:s", -631123200)."\n";
echo strtotime("Jan 1 1950")."\n";
echo date("m/d/Y H:i:s", 946713600)."\n";
echo strtotime("Jan 1 2000")."\n";
?>
--EXPECT--
01/01/1902 00:00:00
-2145888000
01/01/1950 00:00:00
-631123200
01/01/2000 00:00:00
946713600

View File

@ -0,0 +1,13 @@
--TEST--
Bug #32555 (strtotime("tomorrow") can return false)
--FILE--
<?php
putenv("TZ=US/Eastern");
$stamp = 1112427000;
print strftime('%c %Z',strtotime('now',$stamp)) ."\n";
print strftime('%c %Z',strtotime('tomorrow',$stamp)) ."\n";
?>
--EXPECT--
Sat Apr 2 02:30:00 2005 EST
Sun Apr 3 00:00:00 2005 EST

View File

@ -0,0 +1,13 @@
--TEST--
Bug #32588 (strtotime() error for 'last xxx' DST problem)
--FILE--
<?php
putenv("TZ=America/New_York");
echo date('D Y/m/d/H:i:s', strtotime('last saturday', 1112703348)). "\n";
echo date('D Y/m/d/H:i:s', strtotime("last sunday", 1112703348)). "\n";
echo date('D Y/m/d/H:i:s', strtotime('last monday', 1112703348)). "\n";
--EXPECT--
Sat 2005/04/02/00:00:00
Sun 2005/04/03/00:00:00
Mon 2005/04/04/00:00:00