Skip site navigation (1) Skip section navigation (2)

Re: BUG #1787: Timestamp issue for moment when clock moved to DST

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Lumir Vanek" <vanek(at)idea-envi(dot)cz>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1787: Timestamp issue for moment when clock moved to DST
Date: 2005-07-26 13:50:51
Message-ID: 3414.1122385851@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Lumir Vanek" <vanek(at)idea-envi(dot)cz> writes:
> CREATE TABLE test_date (start_time timestamp (6) NOT NULL);

> INSERT INTO test_date VALUES(to_timestamp('26.3.2000 01:00:00', 'dd.mm.YYYY
> hh24:mi:ss'));

to_timestamp produces a timestamp with time zone.  Rotating that to a
timestamp without time zone is going to have strange behaviors at DST
boundaries.  You probably really want to be storing timestamp with tz
anyway, given that you think the timestamps represent real time instants
;-)

Alternatively, why bother with to_timestamp at all?  Given an
appropriate DateStyle setting, the native timestamp input data converter
is going to do just fine with this data format.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: podDate: 2005-07-26 14:48:00
Subject: Re: krb5 authentication and multihomed server hosts
Previous:From: Tom LaneDate: 2005-07-26 13:42:13
Subject: Re: krb5 authentication and multihomed server hosts

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group