Re: Support TZ format code in to_timestamp() - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Support TZ format code in to_timestamp()
Date
Msg-id ZJM8ZijyoqoY+YG4@momjian.us
Whole thread Raw
In response to Support TZ format code in to_timestamp()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Support TZ format code in to_timestamp()
List pgsql-hackers
On Tue, Jun 13, 2023 at 12:20:42PM -0400, Tom Lane wrote:
> It's annoyed me for some time that to_timestamp() doesn't implement
> the TZ format code that to_char() has.  I finally got motivated to
> do something about that after the complaint at [1] that jsonpath's
> datetime() method can't read typical JSON.stringify() output like
> "2023-05-22T03:09:37.825Z".  We do already understand "Z" as a
> time zone abbreviation for UTC; we just need to get formatting.c
> to support this.

I have to admit I tend to prefer actual time zone names like
"America/New_York" over acronyms or offset values.  However, I can see
the dump/restore problem with such names.

Parenthetically, I often use airport codes that map to time zones in my
own calendar.  I would argue that on a global scale airport codes are
actually more useful than abbreviations like EST, assuming you don't
need to designate whether daylight saving time was active, e.g. EST vs.
EDT.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: add non-option reordering to in-tree getopt_long
Next
From: Bəxtiyar Neyman
Date:
Subject: Re: Can JoinFilter condition be pushed down into IndexScan?