Re: timestamp/date bug

From: Nabil Sayegh <nsmail(at)sayegh(dot)de>
To: Juan Flynn <juan(at)netsoc(dot)tcd(dot)ie>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: timestamp/date bug
Date: 2001-02-05 16:38:45
Message-ID: 3A7ED715.EE289344@sayegh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2001-02-05 17:00:38 Re: postmaster grows
Previous Message Tom Lane 2001-02-05 16:36:52 Re: PROC struct