Re: Allowed timezone values

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Subject: Re: Allowed timezone values
Date: 2005-10-13 17:38:28
Message-ID: 23824.1129225108@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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 to arrive 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Wong 2005-10-13 17:57:39 Re: Spinlocks, yet again: analysis and proposed patches
Previous Message Bruce Momjian 2005-10-13 17:33:16 Re: [HACKERS] Added documentation about caching, reliability