pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pratikchirania <pratik.chirania@hp.com>
Cc: pgsql-bugs@postgresql.org
Cc: Magnus Hagander <magnus@hagander.net>
Subject: Re: Timezone issues with Postrres
Date: Thu, 22 Sep 2011 01:42:54 -0400
Message-ID: <10216.1316670174@sss.pgh.pa.us> (raw)
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>
	<CA+TgmobN-OFXRXpGCTi=e-sk2Lm+97As9B+bchWewjjLcohvzw@mail.gmail.com>
	<4E7A4570.9040609@timbira.com>
	<28648.1316637111@sss.pgh.pa.us>
	<1316666855451-4828973.post@n5.nabble.com>

pratikchirania <pratik.chirania@hp.com> 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



view thread (12+ messages)  latest in thread

Message-ID: <10216.1316670174@sss.pgh.pa.us>
Permalink:  ../10216.1316670174@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10216.1316670174@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pratik.chirania@hp.com, magnus@hagander.net
  Subject: Re: Timezone issues with Postrres
  In-Reply-To: <10216.1316670174@sss.pgh.pa.us>
  References: <1316149023380-4809498.post@n5.nabble.com> <4E7364B8.5070608@timbira.com> <1316589418035-4825401.post@n5.nabble.com> <CA+TgmobN-OFXRXpGCTi=e-sk2Lm+97As9B+bchWewjjLcohvzw@mail.gmail.com> <4E7A4570.9040609@timbira.com> <28648.1316637111@sss.pgh.pa.us> <1316666855451-4828973.post@n5.nabble.com> <10216.1316670174@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox