Re: IANA timezone abbreviations versus timezone_abbreviations

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andreas Karlsson <andreas(at)proxel(dot)se>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: IANA timezone abbreviations versus timezone_abbreviations
Date: 2024-12-28 23:47:08
Message-ID: Z3CN_Jot0zo7HA8a@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 16, 2024 at 02:57:59PM -0500, Tom Lane wrote:
> Andreas Karlsson <andreas(at)proxel(dot)se> writes:
> > On 12/13/24 12:33 AM, Tom Lane wrote:
> >> What I think we should do about this is to teach timestamp
> >> input to look into the current IANA time zone to see if it
> >> knows the given abbreviation, and if so use that meaning
> >> regardless of what timezone_abbreviations might say.
>
> > I am not convinced this is an improvement. While this patch removes the
> > round-trip hazard it also makes it confusing to use the
> > timezone_abbreviations GUC since it can be overridden by IANA data based
> > on your current timezone. So you need to know all the, sometimes weird,
> > names for your current timezone. Seems unnecessarily hard to reason
> > about and wouldn't most people who use timezone_abbreviations rely on
> > the current behavior?
>
> Presumably they're not that weird to the locals?
>
> I am not sure what you mean by "people who use
> timezone_abbreviations". I think that's about everyone --- it's
> not like the default setting doesn't contain any abbreviations.
> (If it didn't then we'd not have such a problem...)
>
> > But that said I personally only use ISO timestamps with numerical
> > offsets. Partially to avoid all this mess.
>
> If you only use ISO notation then this doesn't matter to you
> either way.

Yes, your patch seems like a big improvement.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Do not let urgent matters crowd out time for investment in the future.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2024-12-29 00:59:55 Re: Query regarding pg_prewarm extension
Previous Message Pavel Stehule 2024-12-28 21:49:59 Re: Re: proposal: schema variables