From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> |
Cc: | tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Allowed timezone values |
Date: | 2005-10-14 01:21:11 |
Message-ID: | 200510140121.j9E1LCb15150@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tatsuo Ishii wrote:
> > > 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.)
>
> Shall I add JST to our zic database? It's quite confusing that
> "2005-10-14 12:00 JST" is allowed while ""SET TIME ZONE 'JST'" is not,
> and "2005-10-14 12:00 Japan" is NOT allowed while ""SET TIME ZONE
> 'Japan'" is OK. Note that there's no daylight-saving time in Japan (at
> this point).
I have to say, I am a little confused too. First, why does JST work but
XST does not? Where does it get the JST from? The database?
test=> select '2005-10-14 12:00 JST'::timestamp with time zone;
timestamptz
------------------------
2005-10-13 23:00:00-04
(1 row)
test=> select '2005-10-14 12:00 XST'::timestamp with time zone;
ERROR: invalid input syntax for type timestamp with time zone: "2005-10-14 12:00 XST"
And this is Tatsuo's complaint:
test=> select '2005-10-14 12:00 Asia/Tokyo'::timestamp with time zone;
ERROR: invalid input syntax for type timestamp with time zone: "2005-10-14 12:00 Asia/Tokyo"
test=> set timezone = 'Asia/Tokyo';
SET
And this:
test=> set timezone = 'JST';
ERROR: unrecognized time zone name: "JST"
test=> set timezone = 'JST9';
SET
test=> select '2005-10-14 12:00 JST9'::timestamp with time zone;
ERROR: invalid input syntax for type timestamp with time zone: "2005-10-14 12:00 JST9"
I assume it is related to these two TODO entries:
o Merge hardwired timezone names with the TZ database; allow either
kind everywhere a TZ name is currently taken
o Allow customization of the known set of TZ names (generalize the
present australian_timezones hack)
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2005-10-14 01:31:46 | Re: enhancement to pg_dump: supress columns |
Previous Message | Tatsuo Ishii | 2005-10-14 01:07:47 | Re: Allowed timezone values |