Re: to_timestamp returns the incorrect result for the DST fall over time. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: to_timestamp returns the incorrect result for the DST fall over time.
Date
Msg-id 12763.1294165610@sss.pgh.pa.us
Whole thread Raw
In response to to_timestamp returns the incorrect result for the DST fall over time.  (Gouse <gkhaji@gmail.com>)
Responses Re: to_timestamp returns the incorrect result for the DST fall over time.
List pgsql-bugs
Gouse <gkhaji@gmail.com> writes:
> I find that the to_timestamp giving the incorrect result for the DST time
> period.

On what grounds do you claim it's incorrect?

> select to_timestamp('2010-03-28 01:00:03 243','YYYY-MM-DD HH24:MI:SS.MS')
> results '2010-03-28 02:00:03.243 + 01'  , I am not sure if this is correct.

The reason it does that is that actually there *is* no such local time
as 1:00:03 on that date.  Clocks are supposed to jump from 1AM directly
to 2AM.  PG's actual behavior is that the bogus time is interpreted as
standard time (UTC+0 in your case).  The only other thing it could
plausibly do is throw an error, and that has been judged to be less
useful.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Gouse
Date:
Subject: to_timestamp returns the incorrect result for the DST fall over time.
Next
From: "Robert Walker"
Date:
Subject: Are CSV logs supported in the PgAdmin log viewer?