Subject: Re: timezone confusion
To: None <tech-userlevel@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-userlevel
Date: 04/13/2006 21:23:38
On Thu, 13 Apr 2006, der Mouse wrote:
> Except I don't *want* DST rules; I want something I can put in TZ that
> will make time conversion run in, say, -0400, regardless of where
> anyone is and whether DST is in effect anywhere.

TZ="FOO+4", where "FOO" is an arbitrary name at least 3 chars in length

> Even if I just reverse the sign, that still leaves me with nothing I
> *can use to get, say, -0330.

TZ="FOO+3:30".

> There are indications in those comments you pointed me at that
> TZ can be set to something other than a name of a file under
> /usr/share/zoneinfo; is this documented anywhere (besides POSIX
> itself, which I don't have a copy of)?

http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html,
or you can just reverse engineer it from the code in tzparse() in
src/lib/libc/localtime.c

--apb (Alan Barrett)