From: Charles Hedrick (hedrick@geneva.rutgers.edu)
Date: 08/03/93


From: hedrick@geneva.rutgers.edu (Charles Hedrick)
Subject: Re: what time is it?
Date: 3 Aug 1993 07:18:47 GMT

davidsen@sixhub.UUCP (Wm E. Davidsen Jr) writes:

>Sure would be nice if this feature worked with conventional UNIX
>timezone info as well. I recognize that the new scheme is vastly
>flexible, impressively powerful, and a total pain unless you use
>one of the predefined values.

>I confess to finding something like PST8PDT a lot easier to
>type, understand, and generate without days of looking at a
>manual.

huh? The POSIX date formats do work. Libc is certainly intended to
support all POSIX features. You can do

  setenv TZ PST8PDT

I just tried it and it worked. The only thing is that
/usr/lib/zoneinfo/posixrules must be set up. But that file is the
same everywhere, so it should be included as part of SLS or whatever
other system you got. If all your want is POSIX timezone handling,
the only file you need is this one, and it's the same no matter what
time zone your computer is in. So there should be no setup
complexities for people that are satisfied with POSIX. I happen to
think some of the additional features are nice, but you shouldn't have
to do anything special to get POSIX behavior.

If you don't have /usr/lib/zoneinfo/posixrules, (1) complain to
whoever you got libc from. It should be part of all distributions of
libc, since it's needed for libc to implement the POSIX spec. (This
is probably a bug. The glibc specs say that routines should not
require any external data to get basic POSIX behavior. However the
time stuff came from Berkeley, because the code from glibc didn't
work. It wouldn't take much work to build in a default.) (2) If you
have any of the zoneinfo files, note that posixrules an be a copy of
or link to any of the U.S. time zone files. It doesn't matter which
one -- only a few fields in it are used.