1

This is similar to these questions:

I'm running Postgres 10.3. As per the docs, many time zone descriptors are interpreted as POSIX, which calculates negative offsets east of UTC while ISO 8601 interprets negative offsets west of UTC. But then this:

SET TIME ZONE '-7';
SHOW TIME ZONE;
>> <-07>+07
SELECT NOW();
>> 2018-09-26 12:00:20.309182-07
SELECT NOW() AT TIME ZONE 'America/Los_Angeles'
>> 2018-09-26 12:00:22.445955
SELECT NOW() AT TIME ZONE '-7'
>> 2018-09-27 02:00:27.862773

It appears that '-7' is interpreted as ISO 8601 when used in SET TIME ZONE '-7' and as POSIX when used in AT TIME ZONE '-7'.

Is there a reason for this? Is it documented somewhere?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.