Re: bug in date_part() function in 6.5.2, 7.0.2 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: bug in date_part() function in 6.5.2, 7.0.2
Date
Msg-id 1938.968306749@sss.pgh.pa.us
Whole thread Raw
In response to Re: bug in date_part() function in 6.5.2, 7.0.2  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
List pgsql-bugs
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
>> Looks to me like an off-by-one kind of problem in deciding which
>> timezone applies to midnight of a transition day.

> The date->timestamp conversion code gets this right, so you might want
> to look at that.

Au contraire: the cited examples appear to prove that the
date->timestamp conversion code gets this *wrong*.  Or did
you miss the point of

regression=# select '2000-04-02'::date::timestamp;
        ?column?
------------------------
 2000-04-01 23:00:00-05
(1 row)

            regards, tom lane

pgsql-bugs by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: bug in date_part() function in 6.5.2, 7.0.2
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: How to connect to a remote database