bug33415-2.phpt

来自「PHP v6.0 For Linux 运行环境:Win9X/ WinME/ Wi」· PHPT 代码 · 共 343 行

PHPT
343
字号
--TEST--Bug #33415 [2] (Possibly invalid non-one-hour DST or timezone shifts)--FILE--<?phpprint "TZ=Africa/Bujumbura - *Note*: Unexpected, as does not appear tohave a DST or timezone transition.\n";putenv("TZ=Africa/Bujumbura");$tStamp = mktime (17, 17, 17, 1, 1, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Wednesday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Wednesday            00:00:00\n\n";print "TZ=Asia/Thimbu - Is it OK for this to be 0:30 AM? yes\n";putenv("TZ=Asia/Thimbu");$tStamp = mktime (17, 17, 17, 1, 6476, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Thursday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Thursday            00:30:00\n\n";print "TZ=Indian/Cocos - Is it OK for this to be 6:30 AM? Note: does notappear to have a DST or timezone transition.\n";putenv("TZ=Indian/Cocos");$tStamp = mktime (17, 17, 17, 1, 1, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Thursday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Thursday            00:00:00\n\n";print "TZ=Africa/Lubumbashi - Is it OK for this to be 2 AM? Note: doesnot appear to have a DST or timezone transition.\n";putenv("TZ=Africa/Lubumbashi");$tStamp = mktime (17, 17, 17, 1, 1, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Saturday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Saturday            00:00:00\n\n";print "TZ=Asia/Kashgar - Is it OK for this to be 3 AM? yes\n";putenv("TZ=Asia/Kashgar");$tStamp = mktime (17, 17, 17, 1, 3767, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Thursday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Thursday            03:00:00\n\n";print "TZ=Indian/Christmas - Is it OK for this to be 7 AM?  Note: doesnot appear to have a DST or timezone transition.\n";putenv("TZ=Indian/Christmas");$tStamp = mktime (17, 17, 17, 1, 1, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Sunday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Sunday            00:00:00\n\n";print "TZ=America/Santo_Domingo - Is it OK for this to be 0:30 AM? yes\n";putenv("TZ=America/Santo_Domingo");$tStamp = mktime (17, 17, 17, 1, 291, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Sunday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Sunday            00:30:00\n\n";print "TZ=Pacific/Truk - Is it OK for this to be 10 AM?  Note: does notappear to have a DST or timezone transition.\n";putenv("TZ=Pacific/Truk");$tStamp = mktime (17, 17, 17, 1, 1, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Tuesday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Tuesday            00:00:00\n\n";print "TZ=Pacific/Ponape - Is it OK for this to be 11 AM?  Note: doesnot appear to have a DST or timezone transition.\n";putenv("TZ=Pacific/Ponape");$tStamp = mktime (17, 17, 17, 1, 1, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Monday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Monday            00:00:00\n\n";print "TZ=America/Scoresbysund - Is it OK for this to be 2 AM? yes\n";putenv("TZ=America/Scoresbysund");$tStamp = mktime (17, 17, 17, 1, 4099, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Sunday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Sunday            02:00:00\n\n";print "TZ=America/Guyana - Is it OK for this to be 0:45 AM? yes\n";putenv("TZ=America/Guyana");$tStamp = mktime (17, 17, 17, 1, 2031, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Thursday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Thursday            00:45:00\n\n";print "TZ=Asia/Tehran - Is it OK for this to be 0:30 AM? yes\n";putenv("TZ=Asia/Tehran");$tStamp = mktime (17, 17, 17, 1, 2855, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Tuesday", $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 "TZ=Pacific/Tarawa - Is it OK for this to be Midday? Note: doesnot appear to have a DST or timezone transition.\n";     putenv("TZ=Pacific/Tarawa");$tStamp = mktime (17, 17, 17, 1, 1, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Monday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Monday            00:00:00\n\n";print "TZ=Africa/Monrovia - Is it OK for this to be 00:44:30 AM? yes\n";putenv("TZ=Africa/Monrovia");$tStamp = mktime (17, 17, 17, 1, 845, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Monday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Monday            00:44:30\n\n";print "TZ=Asia/Katmandu - Is it OK for this to 0:15 AM?. yes\n";putenv("TZ=Asia/Katmandu");$tStamp = mktime (17, 17, 17, 1, 5838, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Wednesday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Wednesday            00:15:00\n\n";         print "TZ=Pacific/Nauru - Is it OK for this to be 0:30? yes\n";putenv("TZ=Pacific/Nauru");$tStamp = mktime (17, 17, 17, 1, 3401, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Tuesday", $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 "TZ=Pacific/Niue - Is it OK for this to be 0:30 AM? yes\n";putenv("TZ=Pacific/Niue");$tStamp = mktime (17, 17, 17, 1, 3189, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Sunday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Sunday            00:30:00\n\n";            print "TZ=Pacific/Port_Moresby - Is it OK for this to be 10 AM? No DSTor timezone transition.\n";putenv("TZ=Pacific/Port_Moresby");$tStamp = mktime (17, 17, 17, 1, 1, 1970);   print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Thursday", $tStamp); print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Thursday            00:00:00\n\n";          print "TZ=America/Miquelon - Is it OK for this to be 1 AM ? yes\n";putenv("TZ=America/Miquelon");$tStamp = mktime (17, 17, 17, 1, 3767, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Thursday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Thursday            01:00:00\n\n";print "TZ=Pacific/Palau - Is it OK for this to be 9 AM? No DST ortimezone transition.\n";putenv("TZ=Pacific/Palau");   $tStamp = mktime (17, 17, 17, 1, 1, 1970);   print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Saturday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Saturday            00:00:00\n\n";print "TZ=Pacific/Funafuti - Is it OK for this to be midday?  Note: doesnot appear to have a DST or timezone transition.\n";putenv("TZ=Pacific/Funafuti");$tStamp = mktime (17, 17, 17, 1, 1, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Wednesday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Wednesday            00:00:00\n\n";print "TZ=Pacific/Wake - Is it OK for this to be midday?  Note: does notappear to have a DST or timezone transition.\n";putenv("TZ=Pacific/Wake");$tStamp = mktime (17, 17, 17, 1, 1, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Tuesday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Tuesday            00:00:00\n\n";print "TZ=Pacific/Wallis - Is it OK for this to be midday?  Note: doesnot appear to have a DST or timezone transition.\n";putenv("TZ=Pacific/Wallis");$tStamp = mktime (17, 17, 17, 1, 1, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Tuesday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Tuesday            00:00:00\n\n";print "TZ=America/Paramaribo - Is it OK for this to be 0:30 AM? yes\n";putenv("TZ=America/Paramaribo");$tStamp = mktime (17, 17, 17, 1, 5381, 1970);print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";$strtotime_tstamp = strtotime("next Monday", $tStamp);print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";print "wanted=Monday            00:30:00\n\n";?>--EXPECT--TZ=Africa/Bujumbura - *Note*: Unexpected, as does not appear tohave a DST or timezone transition.tStamp=Thursday 1970-01-01 17:17:17 CAT 0result=Wednesday 1970-01-07 00:00:00 CAT 0wanted=Wednesday            00:00:00TZ=Asia/Thimbu - Is it OK for this to be 0:30 AM? yestStamp=Thursday 1987-09-24 17:17:17 IST 0result=Thursday 1987-10-01 00:30:00 BTT 0wanted=Thursday            00:30:00TZ=Indian/Cocos - Is it OK for this to be 6:30 AM? Note: does notappear to have a DST or timezone transition.tStamp=Thursday 1970-01-01 17:17:17 CCT 0result=Thursday 1970-01-08 00:00:00 CCT 0wanted=Thursday            00:00:00TZ=Africa/Lubumbashi - Is it OK for this to be 2 AM? Note: doesnot appear to have a DST or timezone transition.tStamp=Thursday 1970-01-01 17:17:17 CAT 0result=Saturday 1970-01-03 00:00:00 CAT 0wanted=Saturday            00:00:00TZ=Asia/Kashgar - Is it OK for this to be 3 AM? yestStamp=Thursday 1980-04-24 17:17:17 KAST 0result=Thursday 1980-05-01 03:00:00 CST 0wanted=Thursday            03:00:00TZ=Indian/Christmas - Is it OK for this to be 7 AM?  Note: doesnot appear to have a DST or timezone transition.tStamp=Thursday 1970-01-01 17:17:17 CXT 0result=Sunday 1970-01-04 00:00:00 CXT 0wanted=Sunday            00:00:00TZ=America/Santo_Domingo - Is it OK for this to be 0:30 AM? yestStamp=Sunday 1970-10-18 17:17:17 EST 0result=Sunday 1970-10-25 00:30:00 EHDT 1wanted=Sunday            00:30:00TZ=Pacific/Truk - Is it OK for this to be 10 AM?  Note: does notappear to have a DST or timezone transition.tStamp=Thursday 1970-01-01 17:17:17 TRUT 0result=Tuesday 1970-01-06 00:00:00 TRUT 0wanted=Tuesday            00:00:00TZ=Pacific/Ponape - Is it OK for this to be 11 AM?  Note: doesnot appear to have a DST or timezone transition.tStamp=Thursday 1970-01-01 17:17:17 PONT 0result=Monday 1970-01-05 00:00:00 PONT 0wanted=Monday            00:00:00TZ=America/Scoresbysund - Is it OK for this to be 2 AM? yestStamp=Sunday 1981-03-22 17:17:17 CGT 0result=Sunday 1981-03-29 02:00:00 EGST 1wanted=Sunday            02:00:00TZ=America/Guyana - Is it OK for this to be 0:45 AM? yestStamp=Thursday 1975-07-24 17:17:17 GYT 0result=Thursday 1975-07-31 00:45:00 GYT 0wanted=Thursday            00:45:00TZ=Asia/Tehran - Is it OK for this to be 0:30 AM? yestStamp=Tuesday 1977-10-25 17:17:17 IRST 0result=Tuesday 1977-11-01 00:30:00 IRST 0wanted=Tuesday            00:30:00TZ=Pacific/Tarawa - Is it OK for this to be Midday? Note: doesnot appear to have a DST or timezone transition.tStamp=Thursday 1970-01-01 17:17:17 GILT 0result=Monday 1970-01-05 00:00:00 GILT 0wanted=Monday            00:00:00TZ=Africa/Monrovia - Is it OK for this to be 00:44:30 AM? yestStamp=Monday 1972-04-24 17:17:17 LRT 0result=Monday 1972-05-01 00:44:30 GMT 0wanted=Monday            00:44:30TZ=Asia/Katmandu - Is it OK for this to 0:15 AM?. yestStamp=Wednesday 1985-12-25 17:17:17 IST 0result=Wednesday 1986-01-01 00:15:00 NPT 0wanted=Wednesday            00:15:00TZ=Pacific/Nauru - Is it OK for this to be 0:30? yestStamp=Tuesday 1979-04-24 17:17:17 NRT 0result=Tuesday 1979-05-01 00:30:00 NRT 0wanted=Tuesday            00:30:00TZ=Pacific/Niue - Is it OK for this to be 0:30 AM? yestStamp=Sunday 1978-09-24 17:17:17 NUT 0result=Sunday 1978-10-01 00:30:00 NUT 0wanted=Sunday            00:30:00TZ=Pacific/Port_Moresby - Is it OK for this to be 10 AM? No DSTor timezone transition.tStamp=Thursday 1970-01-01 17:17:17 PGT 0result=Thursday 1970-01-08 00:00:00 PGT 0wanted=Thursday            00:00:00TZ=America/Miquelon - Is it OK for this to be 1 AM ? yestStamp=Thursday 1980-04-24 17:17:17 AST 0result=Thursday 1980-05-01 01:00:00 PMST 0wanted=Thursday            01:00:00TZ=Pacific/Palau - Is it OK for this to be 9 AM? No DST ortimezone transition.tStamp=Thursday 1970-01-01 17:17:17 PWT 0result=Saturday 1970-01-03 00:00:00 PWT 0wanted=Saturday            00:00:00TZ=Pacific/Funafuti - Is it OK for this to be midday?  Note: doesnot appear to have a DST or timezone transition.tStamp=Thursday 1970-01-01 17:17:17 TVT 0result=Wednesday 1970-01-07 00:00:00 TVT 0wanted=Wednesday            00:00:00TZ=Pacific/Wake - Is it OK for this to be midday?  Note: does notappear to have a DST or timezone transition.tStamp=Thursday 1970-01-01 17:17:17 WAKT 0result=Tuesday 1970-01-06 00:00:00 WAKT 0wanted=Tuesday            00:00:00TZ=Pacific/Wallis - Is it OK for this to be midday?  Note: doesnot appear to have a DST or timezone transition.tStamp=Thursday 1970-01-01 17:17:17 WFT 0result=Tuesday 1970-01-06 00:00:00 WFT 0wanted=Tuesday            00:00:00TZ=America/Paramaribo - Is it OK for this to be 0:30 AM? yestStamp=Monday 1984-09-24 17:17:17 SRT 0result=Monday 1984-10-01 00:30:00 SRT 0wanted=Monday            00:30:00

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?