Annotation of embedaddon/php/ext/date/tests/bug13142.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #13142 (strtotime handling of "M d H:i:s Y" format)
! 3: --INI--
! 4: date.timezone=US/Eastern
! 5: --SKIPIF--
! 6: <?php
! 7: if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
! 8: die("skip. set TZ env is not supported at runtime.");
! 9: }
! 10: if (!@putenv("TZ=US/Eastern") || getenv("TZ") != 'US/Eastern') {
! 11: die("skip unable to change TZ enviroment variable\n");
! 12: }
! 13: ?>
! 14: --FILE--
! 15: <?php
! 16:
! 17: if (date('T') == 'GMT') {
! 18: putenv("TZ=EST5EDT4,M4.1.0,M10.5.0");
! 19: }
! 20: echo date("r\n", strtotime("Sep 04 16:39:45 2001"));
! 21: echo date("r\n", strtotime("Sep 04 2001 16:39:45"));
! 22: ?>
! 23: --EXPECT--
! 24: Tue, 04 Sep 2001 16:39:45 -0400
! 25: Tue, 04 Sep 2001 16:39:45 -0400
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>