BUG #2350: Timezone string fails in a certain context (see below).

Started by Gloriaabout 20 years ago3 messagesbugs
Jump to latest
#1Gloria
strangest@comcast.net

The following bug has been logged online:

Bug reference: 2350
Logged by: Gloria W
Email address: strangest@comcast.net
PostgreSQL version: 8.1.2
Operating system: Red Hat 2.6.9-11.ELsmp #1 SMP Fri May 20 18:26:27 EDT
Description: Timezone string fails in a certain context (see below).
Details:

This statement works just fine:

insert into tasks (client_id, task_id, scheduled_time,
scheduled_time_required) values(699,4,('2006-03-20 09:06:00 PST' at time
zone 'US/Eastern'),'2006-03-20 06:00:00');
INSERT 0 1

But this one fails:

lii_hardware=# insert into tasks (client_id, task_id, scheduled_time,
scheduled_time_required) values(699,4,('2006-03-20 09:06:00 US/Pacific' at
time zone 'US/Eastern'),'2006-03-20 06:00:00');
ERROR: invalid input syntax for type timestamp with time zone: "2006-03-20
09:06:00 US/Pacific"

The only difference between the two is the PST timezone string was replaced
with a longer, also correct, timezone string.

Thank you in advance for your help.

Gloria

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Gloria (#1)
Re: BUG #2350: Timezone string fails in a certain context (see below).

"Gloria W" <strangest@comcast.net> writes:

ERROR: invalid input syntax for type timestamp with time zone: "2006-03-20
09:06:00 US/Pacific"

That is not currently supported, sorry. Timestamp input can only use
the timezone names known to the "date token table", which basically
is the short abbreviations like PST. It'll get fixed eventually but
it's a feature enhancement not a bug.

regards, tom lane

#3Gloria
strangest@comcast.net
In reply to: Tom Lane (#2)
Re: BUG #2350: Timezone string fails in a certain context

Thank you. I appreciate this quick response.
Gloria

Show quoted text

"Gloria W" <strangest@comcast.net> writes:

ERROR: invalid input syntax for type timestamp with time zone: "2006-03-20
09:06:00 US/Pacific"

That is not currently supported, sorry. Timestamp input can only use
the timezone names known to the "date token table", which basically
is the short abbreviations like PST. It'll get fixed eventually but
it's a feature enhancement not a bug.

regards, tom lane