Re: Inconsistent Parsing of Offsets with Seconds - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Inconsistent Parsing of Offsets with Seconds
Date
Msg-id 788148.1719076559@sss.pgh.pa.us
Whole thread Raw
In response to Inconsistent Parsing of Offsets with Seconds  ("David E. Wheeler" <david@justatheory.com>)
Responses Re: Inconsistent Parsing of Offsets with Seconds
List pgsql-hackers
"David E. Wheeler" <david@justatheory.com> writes:
> The treatment of timestamptz (and timetz) values with offsets that include seconds seems a bit inconsistent.

It's hard to get excited about this.  Per the IANA TZ data,
nowhere in the world has used fractional-minute UT offsets
since 1972:

# In 1972 Liberia was the last country to switch from a UT offset
# that was not a multiple of 15 or 20 minutes.

and they were twenty years later than the next-to-last place (although
IANA will steadfastly deny reliability for their TZ data before 1970).
So timestamps like this simply don't exist in the wild.

> The corresponding jsonpath methods don’t like offsets with seconds *at all*:

Perhaps that should be fixed, but it's pretty low-priority IMO.
I doubt there is any standard saying that JSON timestamps need
to be able to include that.

> I see from the source[1] that offsets between plus or minus 15:59:59
> are allowed; should the `OF` and `TZ formats be able to parse them?

I'd vote no.  to_date/to_char already have enough trouble with format
strings being squishier than one might expect.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Meson far from ready on Windows
Next
From: walther@technowledgy.de
Date:
Subject: Re: Meson far from ready on Windows