On Fri, Oct 15, 2004 at 06:48:40AM +0200, Jaromir Dolecek wrote: > Stuart Bishop wrote: > > Indeed - I was under the impression that the timezone would be preserved > > (which is the case in the external datetime libraries I use), but I now > > see that PostgreSQL will lose this information. > > Err - how come, lose?
It doesn't remember what timezone to gave when you entered the data. It converts it to a date/time and displays it in your local timezone. In other words, postgresql, treats the following as identical: # select '2004-09-01 12:0:0 CEST'::timestamptz; timestamptz ------------------------ 2004-09-01 12:00:00+02 (1 row) # select '2004-09-01 20:0:0 AEST'::timestamptz; timestamptz ------------------------ 2004-09-01 12:00:00+02 (1 row) The answer is correct, but you're getting less out than you put in.. -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
pgp7XONwrzUbW.pgp
Description: PGP signature