Re: Support TZ format code in to_timestamp()
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2023-06-21T18:07:34Z
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@momjian.us> https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.
Commits
-
Support TZ and OF format codes in to_timestamp().
- 8ba6fdf905d0 17.0 landed