mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Update tests due to data changes in tzdata 2018i
This commit is contained in:
@@ -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");
|
||||
@@ -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
|
||||
|
||||
@@ -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');
|
||||
@@ -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
|
||||
|
||||
@@ -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";
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user