Technology and Trends
 USENET Archives
Newsgroups: comp.unix.pc-clone.32bit
Path: sparky!uunet!gumby!wupost!!!dror
From: (Oz Dror)
Subject: timezone function
Message-ID: <>
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Sun, 17 Jan 1993 18:50:12 GMT
Lines: 10

I need to implement the bsd unix timezone function in system V (SCO UNIX)
does anyone have nay ideas.


NAME   Oz Dror, Los Angeles, California
PHONE  (213) 874-7978  Fax (213) 667-6908

Newsgroups: comp.unix.pc-clone.32bit
Path: sparky!uunet!usc!!ucivax!ucla-cs!twinsun!eggert
From: (Paul Eggert)
Subject: Re: timezone function
Message-ID: <bkILyQg?>
Nntp-Posting-Host: farside
Organization: Twin Sun Inc, El Segundo, CA, USA
X-Newsreader: NN version 6.4.19
References: <>
Date: Wed, 20 Jan 1993 03:13:55 GMT
Lines: 23 (Oz Dror) writes:

>I need to implement the bsd unix timezone function in system V (SCO UNIX)
>does anyone have any ideas.

My advice is ``don't''.  Timezone names are ambiguous.  E.g. `CST'
might stand for US Central Standard Time, or Australian Central Summer
Time, or China Standard Time, or Cuba Standard Time, or Chile ...
well, you get the idea.

But if you really want a time zone name for some reason, then there are
ways to get it.  I don't have a copy of SCO handy, but perhaps you can
invoke `localtime' and look at the resulting tm_zone or _tm_zone field.

If that doesn't work, you can try getting a copy of the Arthur David
Olson time zone code, available via anonymous FTP from (, in the ~ftp/pub directory:
	-r--r--r--  1 ado         91953 Jan  8 07:01 tzcode93.tar.Z
	-r--r--r--  1 ado         44313 Jan  8 07:01 tzdata93.tar.Z

Compile it with -DTM_ZONE=_tm_zone, invoke its `localtime' and look
at the resulting _tm_zone field.