Timezone discrepancies - Mailing list pgsql-hackers

From Ed Loehr
Subject Timezone discrepancies
Date
Msg-id 392D4831.C021C38@austin.rr.com
Whole thread Raw
List pgsql-hackers
Here are a few apparent discrepencies between pg7.0beta3 and the timezone
documentation at 

http://www.postgresql.org/docs/postgres/datetime-appendix.htm#DATETIME-APPENDIX-TITLE
http://www.postgresql.org/docs/postgres/datatype1134.htm

on my system (Linux 2.2.12-20smp #1, i686, running in CDT timezone).

1)  Unrecognized timezones claimed in the docs:

ERROR:  Bad timestamp external representation '1-1-2000 00:00:00 DST'
ERROR:  Bad timestamp external representation '1-1-2000 00:00:00 ZP4'
ERROR:  Bad timestamp external representation '1-1-2000 00:00:00 ZP5'
ERROR:  Bad timestamp external representation '1-1-2000 00:00:00 ZP6'

2)  Timezone parsed without complaint but bogusly converted to local
timezone:
       SAT (South Australian Std Time)

Example:
  create table timezones (result timestamp, note varchar);  insert into timezones values ('1-1-2000 00:00:00 SAT',
'SAT'); insert into timezones values ('1-1-2000 00:00:00', 'Local');  insert into timezones values ('1-1-2000 00:00:00
GMT','GMT');  select * from timezones;  drop table timezones;
 

Results:

tzdb=#    select * from timezones;        result         | note  
------------------------+-------2000-01-01 00:00:00-06 | SAT2000-01-01 00:00:00-06 | Local1999-12-31 18:00:00-06 | GMT
(3 rows)


Regards,
Ed Loehr


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pfree() after palloc() in trigger (was: Re: understanding Datum -> char * -> Datum conversions)
Next
From: Ed Loehr
Date:
Subject: parser oddity (t.count)