Re: Mismapping of Mountain Time

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Mismapping of Mountain Time
Date: 2011-03-03 23:38:19
Message-ID: 10394.1299195499@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Josh Berkus <josh(at)agliodbs(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2011-03-03 23:58:14 Re: Possible regression: libpq + SSL aborts when user has no home directory
Previous Message Tom Lane 2011-03-03 23:24:37 Re: Mismapping of Mountain Time