Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A0F4FB5DC1A for ; Thu, 22 Sep 2011 02:43:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 51513-08 for ; Thu, 22 Sep 2011 05:43:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 92CE3B5DC13 for ; Thu, 22 Sep 2011 02:43:06 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p8M5gsWZ010217; Thu, 22 Sep 2011 01:42:54 -0400 (EDT) To: pratikchirania cc: pgsql-bugs@postgresql.org, Magnus Hagander Subject: Re: Timezone issues with Postrres In-reply-to: <1316666855451-4828973.post@n5.nabble.com> References: <1316149023380-4809498.post@n5.nabble.com> <4E7364B8.5070608@timbira.com> <1316589418035-4825401.post@n5.nabble.com> <4E7A4570.9040609@timbira.com> <28648.1316637111@sss.pgh.pa.us> <1316666855451-4828973.post@n5.nabble.com> Comments: In-reply-to pratikchirania message dated "Wed, 21 Sep 2011 21:47:35 -0700" Date: Thu, 22 Sep 2011 01:42:54 -0400 Message-ID: <10216.1316670174@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/154 X-Sequence-Number: 31171 pratikchirania writes: > 1. I am in Costa Rica, using Windows Server 2008 R2/Windows 2003 with > PostgreSQL 8.3/9.0 > 2. System Date/Time Settings shows "CST/Central America" with UTC-6 as extra > display > 4. There is NO DST for CST (Central America) a.k.a America/Costa_Rica to the > PostgreSQL database through the pg_timezone_names view Well, if you want no-DST behavior, this is wrong: > show timezone > "CST6CDT" That timezone specifies daylight savings behavior (CDT). As it happens, it's going to follow the USA rules for when to switch, but any switch would be wrong for Costa Rica. You need the America/Costa_Rica setting. Now having said that, it appears that the reason you got "CST6CDT" by default is that we map the Windows "Central America Standard Time" and "Central America Daylight Time" registry strings to that. This seems clearly wrong. A look at the tzdata "northamerica" file shows that noplace in Central America other than Mexico has observed DST with any regularity, and certainly none of them could be said to follow USA DST rules. Mexico is a separate case, because there are separate "Central Standard Time (Mexico)" and "Central Daylight Time (Mexico)" entries, which we map to "America/Mexico_City", which seems proper. I think we ought to map "Central America Standard Time" to plain CST6. (Or we could map to one of America/Costa_Rica, America/Guatemala, America/El_Salvador, etc, but that seems more likely to offend people in the other countries than provide any additional precision.) I am not sure what we ought to do with "Central America Daylight Time", but on the evidence here I wonder whether that setting exists in the wild at all. Magnus, AFAICT from the commit logs, that lookup table was your work to begin with --- do you remember anything about the reasoning for the Central America entries? regards, tom lane