timezone offsets and documentation

From: Kris Jurka <books(at)ejurka(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: timezone offsets and documentation
Date: 2005-02-02 09:39:01
Message-ID: Pine.BSO.4.56.0502020430090.29074@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The documentation says the time with time zone datatype allows zone
offsets from +12 to -12.

http://www.postgresql.org/docs/8.0/static/datatype-datetime.html

This is at odds with the implementation which allows values +1359 to -1359

jurka=# select '00:00:00+1359'::timetz;
timetz
----------------
00:00:00+13:59
(1 row)

Further the list of available timezone names says that Etc/GMT-14 is a
valid timezone.

http://www.postgresql.org/docs/8.0/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE

This allows:

jurka=# set timezone to 'Etc/GMT-14';
SET
jurka=# select '00:00:00'::timetz;
timetz
-------------
00:00:00+14
(1 row)

but this is not an allowed value:

jurka=# select '00:00:00+14'::timetz;
ERROR: time zone displacement out of range: "00:00:00+14"

Kris Jurka

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2005-02-03 05:40:31 Re: BUG #1458: to_char is crazy
Previous Message Toms Zandon 2005-02-02 00:27:53 BUG #1458: to_char is crazy