Re: to_timestamp returns the incorrect result for the DST fall over time.

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Gouse" <gkhaji(at)gmail(dot)com>,<pgsql-bugs(at)postgresql(dot)org>
Subject: Re: to_timestamp returns the incorrect result for the DST fall over time.
Date: 2011-01-06 14:08:54
Message-ID: 4D257896020000250003904F@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Gouse <gkhaji(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Ashesh Vashi 2011-01-06 14:36:24 Re: BUG #5641: Can not create any python language
Previous Message areveille 2011-01-06 14:08:11 Re: BUG #5641: Can not create any python language