Re: Inconsistency of timezones in postgresql - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: Inconsistency of timezones in postgresql
Date
Msg-id CAKFQuwZtZguX0gmOqUuxCKH5hjCrR5vhxa0o4jBXcrZEn6V21g@mail.gmail.com
Whole thread Raw
In response to Re: Inconsistency of timezones in postgresql  (Chris BSomething <xpusostomos@gmail.com>)
List pgsql-bugs
On Wednesday, July 31, 2024, Chris BSomething <xpusostomos@gmail.com> wrote:

Fair point, I don't know..

On the other hand, Oracle has it..


And if I interpret what it says there correctly (without my brain getting fuzzy)...

"Time zone offset: The string '(+|-)HH:MM' specifies a time zone as an offset from UTC. For example, '-07:00' specifies the time zone that is 7 hours behind UTC. For example, if the UTC time is 11:00 a.m., then the time in the '-07:00' time zone is 4:00 a.m."


Right, we don’t claim to accept a “time zone offset” specification there while they do.  Such a specification would be interpreted as ISO if we could add it without conflicting with existing poorly written posix specifications.

 This seems like bug though: (appendix)
STD offset [ DST [ dstoffset ] [ , rule ] ]

STD should be marked optional since apparently upon input its absence goes unnoticed. The fact we don’t error if it is present but not in the form <..> is also contributing to this problem.

An approach would be to enforce strict POSIX specifications and prohibit any letters preceding the timezone offset; and we’d still shift the incorrectly accepted and interpreted POSIX time zone offset string 12 hours.

David J.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18560: Inconsistent Behavior of PostgreSQL 'LIKE' Operator
Next
From: Aleksander Alekseev
Date:
Subject: Re: Inconsistency of timezones in postgresql