Re: Allowed timezone values - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Allowed timezone values
Date
Msg-id 23824.1129225108@sss.pgh.pa.us
Whole thread Raw
In response to Allowed timezone values  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Allowed timezone values
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I am playing with our allowed timezone settings and saw a few strange
> things.  It understands "EST5EDT", but how does it understand "XYT5ABT"?

Because the code in src/timezone does what the POSIX standard says it
must do.  The relevant man page on my HPUX box says
    TZ          TZ sets time zone information.  TZ can be set using the                format:
                        [:]STDoffset[DST[offset][,rule]]
                   where:
                      STD and DST Three or more bytes that designate the                                  standard time
zone(STD) and summer (or                                  daylight-savings) time zone (DST) STD is
           required.  If DST is not specified,                                  summer time does not apply in this
                           locale.  Any characters other than                                  digits, comma (,), minus
(-),plus (+),                                  or ASCII NUL are allowed.
 
                      offset      offset is the value that must be added                                  to local time
toarrive at Coordinated                                  Universal Time (UTC).  Offset is of the
         form :
 
                                       hh[:mm[:ss]]
        ... etc etc ...

> Also, JST doesn't work anymore, but JST9 does.

JST9 is valid per the POSIX rules.  JST isn't listed as a zone name in
the zic database, so it's not valid.  (Try "Japan" instead.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: A costing analysis tool
Next
From: Mark Wong
Date:
Subject: Re: Spinlocks, yet again: analysis and proposed patches