Skip to content

Commit

Permalink
Update tests due to data changes in tzdata 2018i
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed Jan 7, 2019
1 parent 81da7f7 commit bd1d2c7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions ext/date/tests/bug33414-1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ print "wanted=Friday 00:00:00\n\n";

print "TZ=Pacific/Kwajalein - wrong day.\n";
date_default_timezone_set("Pacific/Kwajalein");
$tStamp = mktime (17, 17, 17, 1, 8626, 1970);
$tStamp = mktime (17, 17, 17, 1, 8627, 1970);
print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";
$strtotime_tstamp = strtotime("next Friday", $tStamp);
$strtotime_tstamp = strtotime("next Saturday", $tStamp);
print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";
print "wanted=Friday 00:00:00\n\n";
print "wanted=Sunday 00:00:00\n\n";

print "TZ=Asia/Ulan_Bator - wrong day.\n";
date_default_timezone_set("Asia/Ulan_Bator");
Expand Down Expand Up @@ -256,9 +256,9 @@ result=Friday 2003-04-04 00:00:00 EEST 1
wanted=Friday 00:00:00

TZ=Pacific/Kwajalein - wrong day.
tStamp=Friday 1993-08-13 17:17:17 -12 0
result=Saturday 1993-08-21 00:00:00 +12 0
wanted=Friday 00:00:00
tStamp=Saturday 1993-08-14 17:17:17 -12 0
result=Sunday 1993-08-22 00:00:00 +12 0
wanted=Sunday 00:00:00

TZ=Asia/Ulan_Bator - wrong day.
tStamp=Saturday 2001-09-22 17:17:17 +09 1
Expand Down
12 changes: 6 additions & 6 deletions ext/date/tests/bug33415-2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ print "wanted=Wednesday 00:15:00\n\n";

print "TZ=Pacific/Nauru - Is it OK for this to be 0:30? yes\n";
date_default_timezone_set('Pacific/Nauru');
$tStamp = mktime (17, 17, 17, 1, 3401, 1970);
$tStamp = mktime (17, 17, 17, 2, 3, 1979);
print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";
$strtotime_tstamp = strtotime("next Tuesday", $tStamp);
$strtotime_tstamp = strtotime("next Saturday +2 hours", $tStamp);
print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";
print "wanted=Tuesday 00:30:00\n\n";
print "wanted=Saturday 02:30:00\n\n";

print "TZ=Pacific/Niue - Is it OK for this to be 0:30 AM? yes\n";
date_default_timezone_set('Pacific/Niue');
Expand Down Expand Up @@ -292,9 +292,9 @@ result=Wednesday 1986-01-01 00:15:00 +0545 0
wanted=Wednesday 00:15:00

TZ=Pacific/Nauru - Is it OK for this to be 0:30? yes
tStamp=Tuesday 1979-04-24 17:17:17 +1130 0
result=Tuesday 1979-05-01 00:30:00 +12 0
wanted=Tuesday 00:30:00
tStamp=Saturday 1979-02-03 17:17:17 +1130 0
result=Saturday 1979-02-10 02:30:00 +12 0
wanted=Saturday 02:30:00

TZ=Pacific/Niue - Is it OK for this to be 0:30 AM? yes
tStamp=Sunday 1978-09-24 17:17:17 -1130 0
Expand Down
6 changes: 3 additions & 3 deletions ext/date/tests/date_modify-1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ date_modify() function [1]
--FILE--
<?php
date_default_timezone_set("Pacific/Kwajalein");
$ts = date_create("Thu Aug 19 1993 23:59:59");
$ts = date_create("Fri Aug 20 1993 23:59:59");
echo date_format($ts, 'D, d M Y H:i:s T'), "\n";
$ts->modify("+1 second");
echo date_format($ts, 'D, d M Y H:i:s T'), "\n";
Expand All @@ -22,8 +22,8 @@ $ts->modify("+ 1 hour 1 second");
echo date_format($ts, 'D, d M Y H:i:s T'), "\n";
?>
--EXPECT--
Thu, 19 Aug 1993 23:59:59 -12
Sat, 21 Aug 1993 00:00:00 +12
Fri, 20 Aug 1993 23:59:59 -12
Sun, 22 Aug 1993 00:00:00 +12
Sun, 27 Mar 2005 01:59:59 CET
Sun, 27 Mar 2005 03:00:00 CEST
Sun, 30 Oct 2005 01:59:59 CEST
Expand Down

0 comments on commit bd1d2c7

Please sign in to comment.