Time zone questions - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Time zone questions
Date
Msg-id GNELIHDDFBOCMGBFGEFOGEMICBAA.chriskl@familyhealth.com.au
Whole thread Raw
List pgsql-hackers
I need to do some timezone manipulation, and I was wondering about this
difference:

australia=# select version();                          version
--------------------------------------------------------------PostgreSQL 7.1.3 on i386--freebsd4.4, compiled by GCC
2.95.3
(1 row)
australia=# select '2002-03-18 00:00:00' at time zone 'Australia/Sydney';
ERROR:  Time zone 'australia/sydney' not recognized
australia=# set time zone 'Australia/Sydney';
SET VARIABLE
australia=# select '2002-03-18 00:00:00';     ?column?
---------------------2002-03-18 00:00:00
(1 row)


Why can't I use 'australia/sydney' as a time zone in 'at time zone'
notation?  Has it been fixed in 7.2?

Now, say I do this:

select '2002-03-18 00:00:00' at time zone 'AEST';

That will give me aussie eastern time quite happily, but what if I don't
know when summer time starts?  I don't want to have to manually choose
between 'AEST' and 'AESST'???  To me, the way to do this would be to use
'Australia/Sydney' as the time zone, but this doesn't work.

7.2 seems to have the same behaviour...

Chris



pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: insert statements
Next
From: mlw
Date:
Subject: Re: Again, sorry, caching.