From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Support TZ format code in to_timestamp() |
Date: | 2023-06-21 18:07:34 |
Message-ID: | ZJM8ZijyoqoY+YG4@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com
Only you can decide what is important to you.
From | Date | Subject | |
---|---|---|---|
Next Message | Bəxtiyar Neyman | 2023-06-21 18:37:24 | Re: Can JoinFilter condition be pushed down into IndexScan? |
Previous Message | Nathan Bossart | 2023-06-21 17:56:24 | Re: add non-option reordering to in-tree getopt_long |