Annotation of embedaddon/php/ext/date/tests/date_default_timezone_set-1.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: date_default_timezone_set() function [1]
! 3: --SKIPIF--
! 4: <?php
! 5: if (substr(PHP_OS, 0, 3) == 'WIN') die('skip diff TZ detection on windows.');
! 6: ?>
! 7: --INI--
! 8: date.timezone=
! 9: --FILE--
! 10: <?php
! 11: putenv("TZ=");
! 12: $date1 = strtotime("2005-01-12 08:00:00");
! 13: $date2 = strtotime("2005-07-12 08:00:00");
! 14: date_default_timezone_set("America/Indiana/Knox");
! 15: $date3 = strtotime("2005-01-12 08:00:00");
! 16: $date4 = strtotime("2005-07-12 08:00:00");
! 17:
! 18: echo date_default_timezone_get(), "\n";
! 19: echo date(DATE_ISO8601, $date1), "\n";
! 20: echo date(DATE_ISO8601, $date2), "\n";
! 21: echo date(DATE_ISO8601, $date3), "\n";
! 22: echo date(DATE_ISO8601, $date4), "\n";
! 23: ?>
! 24: --EXPECTF--
! 25: Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_set-1.php on line 3
! 26:
! 27: Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_set-1.php on line 4
! 28: America/Indiana/Knox
! 29: 2005-01-12T03:00:00-0500
! 30: 2005-07-12T03:00:00-0500
! 31: 2005-01-12T08:00:00-0500
! 32: 2005-07-12T08:00:00-0500
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>