]> granicus.if.org Git - php/commitdiff
MFB: Fix US/Eastern vs. America/New_York style tzset implementations.
authorMelvyn Sopacua <msopacua@php.net>
Tue, 9 Sep 2003 21:56:33 +0000 (21:56 +0000)
committerMelvyn Sopacua <msopacua@php.net>
Tue, 9 Sep 2003 21:56:33 +0000 (21:56 +0000)
ext/standard/tests/time/002.phpt
ext/standard/tests/time/bug13142.phpt

index 515684258394ab697382eb14aedde934b9b4388b..ed1b0f137002bc944952891ec37577c93101f297 100644 (file)
@@ -33,12 +33,12 @@ if (!@putenv("TZ=EST5") || getenv("TZ") != 'EST5') {
            echo date ("Y-m-d H:i:s\n", strtotime ($date));
        }
 
-       if (PHP_OS === "OSF1") {
+       putenv("TZ=US/Eastern");
+       if( date("T") == "GMT" ) {
                // POSIX style
                putenv ("TZ=EST5EDT4,M4.1.0,M10.5.0");
-       } else {
-               putenv ("TZ=US/Eastern");
        }
+
        foreach ($dates as $date) {
            echo date ("Y-m-d H:i:s\n", strtotime ($date));
        }
index f021bea6aa18caa899d4ac96a0526e3b8cc8caa8..af3e1f2f316debb4327869e258be51d29aa8e15c 100644 (file)
@@ -9,6 +9,9 @@ if (!@putenv("TZ=US/Eastern") || getenv("TZ") != 'US/Eastern') {
 --FILE--
 <?php
 putenv("TZ=US/Eastern");
+if (date('T') == 'GMT') {
+       putenv("TZ=EST5EDT4,M4.1.0,M10.5.0");
+}
 echo date("r\n", strtotime("Sep 04 16:39:45 2001"));
 echo date("r\n", strtotime("Sep 04 2001 16:39:45"));   
 ?>