# Picky about TZ dates...

- Thread: https://externals.io/message/223
- Original archive: https://news-web.php.net/php.internals/223
- Started by David Hill \php.net\ on 2003-03-24T18:56:33+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #223 — David Hill \php.net\ — 2003-03-24T18:56:33+00:00

URL: https://externals.io/message/223#223

Hi all,
    It would seem that Tru64 is pickier about the TZ setting than the rest of the known universe. According to our local TZ expert (who can quote chapter and verse from the UNIX 98 standard) a TZ of GMT is not proper, and GMT0 is (again despite the fact that every other platform seems to have no problem with it)  On all of the machines flavors I have to try, GMT0 works.

This pickyiness causes 3 test "failures" for me. 

The affected tests in php5 are:
./ext/standard/tests/time/002.phpt:     putenv ("TZ=GMT");
./ext/standard/tests/time/idate.phpt:putenv ("TZ=GMT");
./ext/standard/tests/time/mktime.phpt:    'GMT',

Unless I hear of any negatives, I would like to change these to GMT0 so I can concentrate on the real bugs.

Dave

---

## #226 — Moriyoshi Koizumi — 2003-03-24T19:14:53+00:00

URL: https://externals.io/message/223#226 · In reply to: #223

Choosy OS.. It seems like a valid fix for me.

Moriyoshi

"David Hill \(php.net\)" <ddhill@php.net> wrote:

> Hi all,
>     It would seem that Tru64 is pickier about the TZ setting than the rest of the known universe. According to our local TZ expert (who can quote chapter and verse from the UNIX 98 standard) a TZ of GMT is not proper, and GMT0 is (again despite the fact that every other platform seems to have no problem with it)  On all of the machines flavors I have to try, GMT0 works.
> 
> This pickyiness causes 3 test "failures" for me. 
> 
> The affected tests in php5 are:
> ./ext/standard/tests/time/002.phpt:     putenv ("TZ=GMT");
> ./ext/standard/tests/time/idate.phpt:putenv ("TZ=GMT");
> ./ext/standard/tests/time/mktime.phpt:    'GMT',
> 
> Unless I hear of any negatives, I would like to change these to GMT0 so I can concentrate on the real bugs.
> 
> Dave

---

## #229 — marcus.boerger@t-online.de — 2003-03-24T19:49:55+00:00

URL: https://externals.io/message/223#229 · In reply to: #223

At 19:56 24.03.2003, David Hill (php.net) wrote:
>Hi all,
>     It would seem that Tru64 is pickier about the TZ setting than the 
> rest of the known universe. According to our local TZ expert (who can 
> quote chapter and verse from the UNIX 98 standard) a TZ of GMT is not 
> proper, and GMT0 is (again despite the fact that every other platform 
> seems to have no problem with it)  On all of the machines flavors I have 
> to try, GMT0 works.
>
>This pickyiness causes 3 test "failures" for me.
>
>The affected tests in php5 are:
>../ext/standard/tests/time/002.phpt:     putenv ("TZ=GMT");
>../ext/standard/tests/time/idate.phpt:putenv ("TZ=GMT");
>../ext/standard/tests/time/mktime.phpt:    'GMT',
>
>Unless I hear of any negatives, I would like to change these to GMT0 so I 
>can concentrate on the real bugs.


PASS for mdk 8.2.

Here is the patch

Index: ext/standard/tests/time/002.phpt
===================================================================
RCS file: /repository/php4/ext/standard/tests/time/002.phpt,v
retrieving revision 1.7
diff -u -r1.7 002.phpt
--- ext/standard/tests/time/002.phpt    13 Mar 2003 18:51:39 -0000      1.7
+++ ext/standard/tests/time/002.phpt    24 Mar 2003 20:44:20 -0000
@@ -28,7 +28,7 @@
         "2001-10-22 21:19:58+0213"
         );

-       putenv ("TZ=GMT");
+       putenv ("TZ=GMT0");
         foreach ($dates as $date) {
             echo date ("Y-m-d H:i:s\n", strtotime ($date));
         }
Index: ext/standard/tests/time/idate.phpt
===================================================================
RCS file: /repository/php4/ext/standard/tests/time/idate.phpt,v
retrieving revision 1.2
diff -u -r1.2 idate.phpt
--- ext/standard/tests/time/idate.phpt  17 Feb 2003 06:23:22 -0000      1.2
+++ ext/standard/tests/time/idate.phpt  24 Mar 2003 20:44:20 -0000
@@ -2,7 +2,7 @@
  `idate()` function
  --FILE--
  <?php
-putenv ("TZ=GMT");
+putenv ("TZ=GMT0");

  $tmp = "UYzymndjHGhgistwLBIW";
  for($a = 0;$a < strlen($tmp); $a++){
Index: ext/standard/tests/time/mktime.phpt
===================================================================
RCS file: /repository/php4/ext/standard/tests/time/mktime.phpt,v
retrieving revision 1.2
diff -u -r1.2 mktime.phpt
--- ext/standard/tests/time/mktime.phpt 9 Feb 2003 12:19:02 -0000       1.2
+++ ext/standard/tests/time/mktime.phpt 24 Mar 2003 20:44:20 -0000
@@ -3,7 +3,7 @@
  --FILE--
  <?php
  $timezones = array(
-    'GMT',
+    'GMT0',
      'GST-1GDT'
  );
