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

Re: bug in date_part() function in 6.5.2, 7.0.2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>, analyst(at)sibinet(dot)ru, pgsql-bugs(at)postgresql(dot)org
Subject: Re: bug in date_part() function in 6.5.2, 7.0.2
Date: 2000-09-07 06:05:49
Message-ID: 1938.968306749@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)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

In response to

Responses

pgsql-bugs by date

Next:From: Thomas LockhartDate: 2000-09-07 06:07:43
Subject: Re: bug in date_part() function in 6.5.2, 7.0.2
Previous:From: Stephan SzaboDate: 2000-09-06 16:40:56
Subject: Re: Possible bug in referential integrity system

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