On Wednesday, June 12, 2002, at 11:57 PM, Tom Lane wrote:
> Martijn van Oosterhout <kleptog@svana.org> writes:
>> Hmm, postgresql knows about daylight savings if your c library
>> knows about
>> it. I'm not exactly sure how it works but you should
>> investigate the PGTZ
>> environment variables. This is what happens on my 7.2.1 system:
>
>> select '02/06/2002 12:00:00 AEST'::timestamp;
>> timestamptz
>> ------------------------
>> 2002-06-02 12:00:00+10
>> (1 row)
>
>> select '02/03/2002 12:00:00 AEST'::timestamp;
>> timestamptz
>> ------------------------
>> 2002-03-02 13:00:00+11
>> (1 row)
>
>> which seems wrong to me...
>
> Looks okay to me. Since you specified the zone in both cases, you got
> the same time-of-day in GMT terms in both cases. The stored internal
> form was 02:00 GMT on each date (assuming your machine thinks that AEST
> is GMT+10, like mine does). That was then rotated to your own local
> time zone (evidently +10/+11) for display purposes.
What seems strange to me is that '02/03/2002 12:00:00 AEST' has
any meaning at all. On March 2, Australia is observing DST, but
AEST is Standard Time. Shouldn't there at least be a warning
when trying to insert a date that doesn't exist?
The results for '02/06/2002 12:00:00 AEST' look correct, because
the time zone matches the reality.
-Ken