TODO-Item: full timezone names

From: Joachim Wieland <joe(at)mcknight(dot)de>
To: pgsql-patches(at)postgresql(dot)org
Subject: TODO-Item: full timezone names
Date: 2006-06-01 08:25:17
Message-ID: 20060601082517.GA7670@mcknight.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Hi,

I propose the appended patch for the Todo item:

o Allow timezone names in SQL strings, '2006-05-24 21:11
Americas/New_York'::timestamptz

I changed the ParseDateTime function as well as DecodeDateTime to support
those timezones in timestamps and DecodeTimeOnly to support it in the
timetz type.

'2006-05-24 21:11 America/New_York'::timestamptz is now the same as
'2006-05-24 21:11'::timestamptz at time zone 'America/New_York'

With a timetz it's more tricky, because "America/New_York" does not specify
a timezone offset by itself, this could change due to daylight savings time
for example. So my idea was to apply whatever offset is valid in this region
at the moment of parsing the string representation.

It passes all existing regression tests, I will supply additional regression
tests as well as documentation patches as soon as you have told me that I'm
on the right track :-)

Joachim

Attachment Content-Type Size
zicTimezones.diff text/plain 4.2 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Robert Treat 2006-06-01 11:46:56 Re: [PATCH] Magic block for modules
Previous Message Martijn van Oosterhout 2006-06-01 06:47:06 Re: [PATCH] Improve EXPLAIN ANALYZE overhead by sampling