Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id D7F602E347E; Thu, 3 Jan 2008 23:57:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 46481-10; Thu, 3 Jan 2008 23:57:06 -0400 (AST) Received: from pyxis.powervt.com.ar (host3.powervt.com.ar [200.43.63.66]) by postgresql.org (Postfix) with ESMTP id CE2B72E30F2; Thu, 3 Jan 2008 23:57:14 -0400 (AST) Received: from pcfhevia ([201.216.249.98]) by pyxis.powervt.com.ar (IPGroup Mail Server) with ESMTP id 1OT48953; Fri, 04 Jan 2008 00:57:12 -0300 From: "Fernando Hevia" To: "'Tom Lane'" , "'Scott Marlowe'" Cc: "'Joe'" , "'SQL Postgresql List'" , Subject: Re: [SQL] Argentinian timezone change at the last moment. How to change pgsql tz db? Date: Fri, 4 Jan 2008 01:57:12 -0200 Organization: IP-TEL Message-ID: <01dc01c84e85$e2abb5a0$8f01010a@iptel.com.ar> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <24363.1199317514@sss.pgh.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Thread-Index: AchNmYxYcNz2Jm7uSB2OGUJBDNqnoAA5rHyA X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/74 X-Sequence-Number: 126284 > Tom Lane [mailto:tgl@sss.pgh.pa.us] wrote: > > Since the OP has apparently already managed to get updated tzdata files > installed on his system, he could just copy them into > /usr/share/postgresql/timezone --- anything using zic should be a > compatible file format. > > The lack-of-ARST-on-input problem can be addressed by mucking with > /usr/share/postgresql/timezonesets/Default, if you're using 8.2. > In earlier versions the table is hardwired into datetime.c :-( > Summing up: After installing the updated tzdata files in the server I had to copy the America/Argentina/* files to /usr/share/postgresql/timezone in order to get postgres determine the correct local time. With 8.2.x the ARST abbreviation was recognized after including the following line in /usr/share/postgresql/8.2/timezonesets/Default ARST -14400 D # Argentina Summer Time postgres=# select '01:13:16.426 ARST Wed Jan 2 2008'::timestamp with time zone; timestamptz ---------------------------- 2008-01-02 01:13:16.426-02 (1 row) I wonder if pg_timezone_names plays any role in the ARST issue. It does contain the right data (appeared after copying tzdata into /usr/share/postgresql/timezone and restarting server) but ARST wasn't accepted till previous step was done. postgres=# select * from pg_timezone_names where abbrev = 'ARST'; name | abbrev | utc_offset | is_dst --------------------------------+--------+------------+-------- localtime | ARST | -02:00:00 | t America/Argentina/Rio_Gallegos | ARST | -02:00:00 | t America/Argentina/Mendoza | ARST | -02:00:00 | t America/Argentina/La_Rioja | ARST | -02:00:00 | t America/Argentina/Buenos_Aires | ARST | -02:00:00 | t America/Argentina/Cordoba | ARST | -02:00:00 | t America/Argentina/Catamarca | ARST | -02:00:00 | t America/Argentina/Ushuaia | ARST | -02:00:00 | t America/Argentina/Tucuman | ARST | -02:00:00 | t America/Argentina/Jujuy | ARST | -02:00:00 | t America/Argentina/San_Juan | ARST | -02:00:00 | t (11 rows) Thanks for all contributions. Regards, Fernando.