Re: BUG #5354: Type timestamptz doesn't allow to store time zone

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Vitali <vitali(at)lumensoftware(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5354: Type timestamptz doesn't allow to store time zone
Date: 2010-03-02 05:27:16
Message-ID: 603c8f071003012127j5c05c457o2ae56f6219704967@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Mar 1, 2010 at 10:52 AM, Vitali <vitali(at)lumensoftware(dot)com> wrote:
>
> The following bug has been logged online:
>
> Bug reference:      5354
> Logged by:          Vitali
> Email address:      vitali(at)lumensoftware(dot)com
> PostgreSQL version: 8.1.x 8.2.x
> Operating system:   Windows, Linux
> Description:        Type timestamptz doesn't allow to store time zone
> Details:
>
> I have a table:
>
> CREATE TABLE test (
>     set_dt timestamptz,
>     set_tm timetz
> ) WITH OIDS;
>
> I do insert into this table:
>
> INSERT INTO test(set_dt, set_tm)
> VALUES('2010-01-01 10:00+02', '10:00+02')
>
> When I select from the table, the timetz has the correct time zone, the
> timestamptz has -6 as a time zone, which is my server default.

I'm not sure what you think the bug is, but timestamptz definitely
doesn't store the time zone in which the value is input. What it does
is makes input and output relative to the then-current time zones
rather than fixed wall-clock times.

...Robert

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Julien 2010-03-02 10:08:55 BUG #5357: PGAdmin: SQL Query Editor does not (always) open files
Previous Message Heikki Linnakangas 2010-03-01 19:20:20 Re: BUG #5355: locale incorrectly comma-separates "(null)"