xref: /PHP-5.4/ext/date/tests/bug33415-1.phpt (revision e753493c)
1--TEST--
2Bug #33415 [1] (Possibly invalid non-one-hour DST or timezone shifts)
3--FILE--
4<?php
5
6print "TZ=America/Jujuy  - Is it OK for this to be 2 AM, rather than 1
7AM as per most DST transitions?\n";
8date_default_timezone_set("America/Jujuy");
9$tStamp = mktime (17, 17, 17, 1, 7593, 1970);
10print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";
11$strtotime_tstamp = strtotime("next Monday", $tStamp);
12print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";
13print "wanted=Monday            00:00:00\n\n";
14
15print "TZ=Asia/Tbilisi - Is it OK for this to be 2 AM?\n";
16date_default_timezone_set("Asia/Tbilisi");
17$tStamp = mktime (17, 17, 17, 1, 12863, 1970);
18print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";
19$strtotime_tstamp = strtotime("next Sunday", $tStamp);
20print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";
21print "wanted=Sunday            00:00:00\n\n";
22?>
23--EXPECT--
24TZ=America/Jujuy  - Is it OK for this to be 2 AM, rather than 1
25AM as per most DST transitions?
26tStamp=Monday 1990-10-15 17:17:17 WART 0
27result=Monday 1990-10-22 00:00:00 WART 0
28wanted=Monday            00:00:00
29
30TZ=Asia/Tbilisi - Is it OK for this to be 2 AM?
31tStamp=Sunday 2005-03-20 17:17:17 GET 0
32result=Sunday 2005-03-27 00:00:00 GET 0
33wanted=Sunday            00:00:00
34