Standard for timezone handling with TZ

Paul Eggert eggert at twinsun.com
Mon Feb 14 17:05:20 UTC 1994


   Date: Mon, 14 Feb 94 09:40:09 EST
   From: ado at elsie.nci.nih.gov (Arthur David Olson)

   ...does POSIX *require* that the above rules be written...  without
   the "+1200" modifier to the zone name that will appear in
   user-visible output?

No.  Posix 1003.1-1990 section 8.1.1 page 153 lines 75-78 requires
that the offset be one or two digits, no more and no less.  So if you
specify TZ='GMT+1200' you are outside the scope of the standard, and
the implementation is free to do what it likes.

However, it's confusing for TZ='GMT+12:00' to mean something entirely
different from TZ='GMT+1200'.  Posix says the former means ``we're 12
hours behind GMT and our time zone is named "GMT"''; my proposed
change makes the latter mean ``we're 12 hours _ahead_ of GMT and our
time zone is named "GMT+1200"''.  The fundamental problem is that the
user interface (Posix TZ strings) uses a different sign than the TZ
package.  Sorry, I don't offhand see a clean fix for this.



More information about the tz mailing list