NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: misc/22221: Chicago time zone file problem

The following reply was made to PR misc/22221; it has been noted by GNATS.

From: David Holland <>
Subject: Re: misc/22221: Chicago time zone file problem
Date: Thu, 3 Apr 2008 14:17:49 +0000

 On Thu, Apr 03, 2008 at 09:45:03AM +0000, Martin Husemann wrote:
  >  Stupid question:
  >  env TZ=/usr/share/zoneinfo/America/Chicago date '+%z'
  >  outputs -0500 for me right now - is that wrong?
 No. That's fine, because the US is in daylight time right now:
    % env TZ=America/Denver date +%z
    % env TZ=America/Chicago date +%z
    % env TZ=America/New_York date +%z
 The value that gets left in the global variable "timezone" is broken,
    % env TZ=America/Denver ./test 
    % env TZ=America/Chicago ./test 
    % env TZ=America/New_York ./test 
 Trying some other zones in America/, it looks as if whatever sets it
 is honoring DST only for Chicago. Which is strange.
 My test.c:
    #include <stdio.h>
    #include <time.h>
    int main(void) {
       time_t t;
       t = time(NULL);
       printf("%ld\n", timezone);
       return 0;
 I think another valid question to raise is whether this global
 variable needs to continue to be supported...
 David A. Holland

Home | Main Index | Thread Index | Old Index