Re: Postgresql 7.0 bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: root <root(at)esc(dot)rosemere(dot)qc(dot)ca>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Postgresql 7.0 bug
Date: 2000-05-29 03:49:23
Message-ID: 4060.959572163@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

root <root(at)esc(dot)rosemere(dot)qc(dot)ca> writes:
> SELECT '2000-04-03'::timestamp - '2000-04-02'::timestamp;
> ?column?
> ----------
> 23:00
> (1 row)

> Why april 2nd, 2000 don't last 1 day (or 24 hours) ?

Here in the USA, that is the right answer because 4/2 was a daylight
savings switchover date. Notice the difference in timezones:

regression=# select '2000-04-03'::timestamp;
?column?
------------------------
2000-04-03 00:00:00-04
(1 row)

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

If it wasn't a DST change date where you live, then you are running
with the wrong timezone setting...

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Karl DeBisschop 2000-05-29 13:30:54 Re: Postgresql 7.0 bug
Previous Message Tom Lane 2000-05-28 17:47:10 Re: An INSERT can kill the PostgreSQL server