bug33415-1.phpt 1.3 KB

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