Time zone questions

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Time zone questions
Date: 2002-03-18 05:51:19
Message-ID: GNELIHDDFBOCMGBFGEFOGEMICBAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message mlw 2002-03-18 06:01:09 Re: Again, sorry, caching.
Previous Message Vince Vielhaber 2002-03-18 03:36:54 Re: insert statements