> Note the time of day. This is evidently a timezone-related bug.
You almost make sense, but the real problem here is that the date is
converted to date + clock 0 when casted to datetime. A more
reasonable way to do it would be converting it to date + clock 12:00.
Then one would avoid the whole problem.
> My guess is that you inserted the data on a system that didn't know
> that 1965-04-24 was a daylight-savings day, and are reading it on a
> system that does (or vice versa?).
It is inserted and read on the same system. It is crasy that
converting to text and back gives different result:
pere=> select fname from user_appl where birthdate != birthdate::text::date;
GNU libc seems to have zoneinfo for Norway back to before 1916, so I
don't think your guess is correct.
##> Petter Reinholdtsen <## | pere(at)td(dot)org(dot)uit(dot)no
http://www.hungry.com/~pere/ | Go Mozilla, go! Go!
pgsql-bugs by date
|Next:||From: Krzysztof Czuma||Date: 1999-08-22 15:01:17|
|Previous:||From: Tom Lane||Date: 1999-08-20 16:40:46|
|Subject: Re: [BUGS] date -> text convertion error |