BUG #5634: timezone/trigger issue

Started by Jaseb Bettsover 15 years ago2 messagesbugs
Jump to latest
#1Jaseb Betts
jasen@free.net.nz

The following bug has been logged online:

Bug reference: 5634
Logged by: Jaseb Betts
Email address: jasen@free.net.nz
PostgreSQL version: 8.3
Operating system: Windows xp 32 bit
Description: timezone/trigger issue
Details:

/pgsql/src/timezone/tznames/Default/ doesn't include CAT
this is the timezone used in South Africa (on windows xp platform
it's listed as "(GMT+02:00) Harare, Pretoria" in the timezone dialog)

http://www.worldtimezone.com/time-africa12.php

As a result with 8.3 on windows some timestamp stuff does not work (in south
africa).

also:
db=> select now();
now
-----------------------------
27/08/2010 04:41:07.921 CAT
(1 row)

db=> select now()::text::timestamp;
ERROR: invalid input syntax for type timestamp: "27/08/2010 04:41:23.375
CAT"

Also if I do NEW.foo=now() in a before update trigger and NEW.foo is of type
TIMEZONE, when I cause the trigger to run I get the same error message as
above.

db=>show lc_time;
lc_time
---------
C
(1 row)

copying the "CAT" entry from Africa.txt into Default seems to fix this.

It suprises me that the timezone comes out as CAT onstead of +02, but I
guess
that's windows doing it's own thing.

I note that EST is apparently also a Brazilian timezone that differs from
the
other two ESTs, but don't know if any users are effected.

http://www.worldtimezone.com/wtz-names/wtz-est.html

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jaseb Betts (#1)
Re: BUG #5634: timezone/trigger issue

"Jaseb Betts" <jasen@free.net.nz> writes:

/pgsql/src/timezone/tznames/Default/ doesn't include CAT

The reason that that's a user-configurable file is that it's impossible
to satisfy everybody :-(. Just add the abbreviations you use locally.

regards, tom lane