Re: timestamp/date bug - Mailing list pgsql-bugs

From Nabil Sayegh
Subject Re: timestamp/date bug
Date
Msg-id 3A7ED715.EE289344@sayegh.de
Whole thread Raw
In response to timestamp/date bug  (juan@netsoc.tcd.ie (Juan Flynn))
List pgsql-bugs
Juan Flynn wrote:

> SELECT to_char(timestamp '23-Mar-2000' + 3, 'Mon DD');
>  to_char
> ---------
>  Mar 25
> (1 row)
>
> Which is wrong, however:

Dates are interpreted "at a special time" (midnight).
Mar 25 is most likely a daylightsaving day for your timezone.

Just add some hours to the result and you're fine.
(In your example substitute 3 with timespan("3 days 4 hours"))
or something like that.
AFAIK this has been fixed in 7.1

--
 Nabil Sayegh
 GPG-Key available at http://www.sayegh.de
 (see http://www.gnupg.org for details)

pgsql-bugs by date:

Previous
From: Karel Zak
Date:
Subject: Re: timestamp/date bug
Next
From: Tom Lane
Date:
Subject: Re: PROC struct