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

From Kevin Grittner
Subject Re: to_timestamp returns the incorrect result for the DST fall over time.
Date
Msg-id 4D257896020000250003904F@gw.wicourts.gov
Whole thread Raw
In response to Re: 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> wrote:

> I am afraid this may not give the result I am looking for.

It sounds like you didn't even try it.  That's bad form.

I'm wondering why you bring to_timestamp into it at all, though.
Are you aware of the behavior of casting?:

test=# select '2011-01-15 00:00:00.0 UTC'::timestamptz;
      timestamptz
------------------------
 2011-01-14 18:00:00-06
(1 row)

If you put together a string with the UTC timezone specified, and
cast it to timestamptz, I think you'll get what you want.

-Kevin

pgsql-bugs by date:

Previous
From: Gouse
Date:
Subject: Re: to_timestamp returns the incorrect result for the DST fall over time.
Next
From: areveille
Date:
Subject: Re: BUG #5641: Can not create any python language