| From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
|---|---|
| To: | Dan Langille <dan(at)langille(dot)org> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: possible time change issue - known problem? |
| Date: | 2003-04-07 12:43:38 |
| Message-ID: | 20030407124338.GA6452@svana.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Mon, Apr 07, 2003 at 08:19:57AM -0400, Dan Langille wrote:
> Looking at the code, I suspect the problem is related to this problem
> which I can duplicate on my current system: PostgreSQL 7.2.3 on i386-
> portbld-freebsd4.6, compiled by GCC 2.95.4
>
> # select current_date, (current_date - interval '1 day')::date;
> date | date
> ------------+------------
> 2003-04-07 | 2003-04-05
>
> I expect the answer to be 2003-04-06 (i.e. yesterday's date).
Out of curiosity, would this weekend be the day you switched to/from
daylight savings time? Then there were only 23 hours in the day, so 1 day
ago was actually the 5th.
Anyway, why not just:
select current_date, current_date-1;
date | ?column?
------------+------------
2003-04-07 | 2003-04-06
(1 row)
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> "the West won the world not by the superiority of its ideas or values or
> religion but rather by its superiority in applying organized violence.
> Westerners often forget this fact, non-Westerners never do."
> - Samuel P. Huntington
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dan Langille | 2003-04-07 12:51:32 | Re: possible time change issue - known problem? |
| Previous Message | Dan Langille | 2003-04-07 12:41:02 | Re: Enum in PostgreSQL - How to |