TODO-Item: full timezone names

Поиск
Список
Период
Сортировка
От Joachim Wieland
Тема TODO-Item: full timezone names
Дата
Msg-id 20060601082517.GA7670@mcknight.de
обсуждение исходный текст
Ответы Re: TODO-Item: full timezone names  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

Вложения

В списке pgsql-patches по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: [PATCH] Improve EXPLAIN ANALYZE overhead by sampling
Следующее
От: Robert Treat
Дата:
Сообщение: Re: [PATCH] Magic block for modules