timezone abbreviation in timestamp string input

From: David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com>
To: Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: timezone abbreviation in timestamp string input
Date: 2004-10-17 09:45:45
Message-ID: 41723F49.5000907@zara.6.isreserved.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

When a timestamp string input contains a timezone abbreviation (CDT,
PST, etc), which timezone offset is used? The input date's or today
date's? The result on my computer suggests the latter.

# create table ts (ts timestamptz);
# insert into ts values ('2004-10-17 00:00:00 CDT'); -- UTC-5
# insert into ts values ('2004-11-17 00:00:00 CDT'); -- UTC-6
# select ts at time zone 'utc' from ts;
timezone
---------------------
2004-10-17 05:00:00
2004-11-17 05:00:00
(2 rows)

If this is true, then perhaps forbid timezone abbreviation in input
string, or emit warning about this?

--
dave

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ken Tozier 2004-10-17 13:30:34 Re: Newbie table definition question
Previous Message Steven Klassen 2004-10-17 09:08:16 Re: Newbie table definition question