pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Mismapping of Mountain Time
Date: Thu, 03 Mar 2011 18:38:19 -0500
Message-ID: <10394.1299195499@sss.pgh.pa.us> (raw)
In-Reply-To: <4D70220F.1020408@agliodbs.com>
References: <4D7016AA.2090609@agliodbs.com>
	<9639.1299193420@sss.pgh.pa.us>
	<4D70220F.1020408@agliodbs.com>

Josh Berkus <josh@agliodbs.com> writes:
>> It's not all that separate: per the Olsen database,
>> 
>> Link	America/Denver		US/Mountain
>> Link	America/Denver		Navajo

> What's more my concern is that Ubuntu, Debian and Red Hat do not set
> $TZ, so we'll get this kind of behavior on most Linux systems with a
> default install of PostgreSQL.  Since it's confusing to users (and will
> result in other such bug reports and/or complaints), it would be nice to
> do something to pick time zones which is more likely to result in
> unsurprising values of Show TimeZone.

[ shrug... ]  The problem here is that "unsurprising" is in the eye of
the beholder.  Given the information available from glibc I don't think
there is any portable way to tell what it thinks the true zone name is.

We could twiddle the tiebreaking rule, like say just use strcmp()
without any preference for shorter lengths.  In this case that would
give us America/Denver which is probably less surprising than Navajo
to some people.  But seeing that the Olsen database contains a very
large and frequently changing set of timezone names, I think anything
we can do here is going to be subject to the principle of conservation
of astonishment.  Making it better for US/Mountain is going to make it
worse for somebody else --- in fact, I seem to recall that the
shortest-name tiebreaking rule got there to hide some even more
egregious behavior of the plain strcmp rule (cf commit
2def4552edbe1ada5aa76954997fd3142cb7c271).

The displayed timezone name is cosmetic.  Live with it.

			regards, tom lane



view thread (10+ messages)  latest in thread

Message-ID: <10394.1299195499@sss.pgh.pa.us>
Permalink:  ../10394.1299195499@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10394.1299195499@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, josh@agliodbs.com
  Subject: Re: Mismapping of Mountain Time
  In-Reply-To: <10394.1299195499@sss.pgh.pa.us>
  References: <4D7016AA.2090609@agliodbs.com> <9639.1299193420@sss.pgh.pa.us> <4D70220F.1020408@agliodbs.com> <10394.1299195499@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