Skip site navigation (1) Skip section navigation (2)

Re: [BUGS] date -> text convertion error

From: Petter Reinholdtsen <pere(at)hungry(dot)com>
To: pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: [BUGS] date -> text convertion error
Date: 1999-08-20 17:12:32
Message-ID: 199908201712.TAA02648@lee.Cc.Uit.No (view raw or flat)
Thread:
Lists: pgsql-bugs
> 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;
  fname
  -----
  Antal
  (1 row)
 
  pere=>

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
 O-  <SCRIPT Language="Javascript">window.close()</SCRIPT>
http://www.hungry.com/~pere/    | Go Mozilla, go! Go!

pgsql-bugs by date

Next:From: Krzysztof CzumaDate: 1999-08-22 15:01:17
Subject:
Previous:From: Tom LaneDate: 1999-08-20 16:40:46
Subject: Re: [BUGS] date -> text convertion error

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group