Re: automatic time zone conversion

From: Ken Williams <ken(at)mathforum(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: automatic time zone conversion
Date: 2002-06-12 23:54:25
Message-ID: B9D4650F-7E5F-11D6-8497-0003936C1626@mathforum.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Wednesday, June 12, 2002, at 11:57 PM, Tom Lane wrote:
> If you want automatic handling of summer times the correct approach is
> to leave off the timezone spec on entry, whereupon PG will intuit the
> correct GMT offset for your timezone rules (as set by the TimeZone
> setting). For instance:
>
> test72=# set timezone to EST5EDT;
> SET VARIABLE
> test72=# select '02/03/2002 12:00:00'::timestamp with time zone;
> timestamptz
> ------------------------
> 2002-02-03 12:00:00-05
> (1 row)
>
> test72=# select '06/03/2002 12:00:00'::timestamp with time zone;
> timestamptz
> ------------------------
> 2002-06-03 12:00:00-04
> (1 row)

Aha - I think that's what I want. Thanks.

I'm getting incredibly confused about the zones, though,
probably because I'm in Australia. On my system, I see this:

[sa0110e0:~] kenw> env|grep -i z
TZ=EET-10EETDT,M10.5.0,M3.5.0

But what's EET? Postgres seems to define that as something in
Eastern Europe. Is there a conflict here? And where can I find
out what all the Mx.x.x stuff means? Is it system-dependent?
(This is AIX.)

Thanks.

-Ken

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua b. Jore 2002-06-12 23:57:01 Re: Troubleshooting SPI_execp() failed in RI_FKey_cascade_del()
Previous Message Stephan Szabo 2002-06-12 21:44:51 Re: Troubleshooting SPI_execp() failed in RI_FKey_cascade_del()