Re: Inconsistency of timezones in postgresql
От | David G. Johnston |
---|---|
Тема | Re: Inconsistency of timezones in postgresql |
Дата | |
Msg-id | CAKFQuwZtZguX0gmOqUuxCKH5hjCrR5vhxa0o4jBXcrZEn6V21g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Inconsistency of timezones in postgresql (Chris BSomething <xpusostomos@gmail.com>) |
Список | 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..https://docs.oracle.com/database/121/NLSPG/ ch4datetime.htm#GUID-D8C7A7EB- A507-42A2-9B10-5301E822A7F2 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 по дате отправления: