From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Luca Ferrari <fluca1978(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: UTC-6 or UTC+6? |
Date: | 2019-10-20 14:10:45 |
Message-ID: | 12910.1571580645@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Luca Ferrari <fluca1978(at)gmail(dot)com> writes:
> template1=# select '2019-10-22 16:00:00' at time zone 'Europe/Rome' as my_time
> , '2019-10-22 16:00:00' at time zone 'America/Denver' as what_should_be,
> '2019-10-22 16:00:00' at time zone 'UTC-6' as utc_minus_6,
> '2019-10-22 16:00:00' at time zone 'UTC+6' as utc_plus_6;
> -[ RECORD 1 ]--+--------------------
> my_time | 2019-10-22 16:00:00
> what_should_be | 2019-10-22 08:00:00
> utc_minus_6 | 2019-10-22 20:00:00
> utc_plus_6 | 2019-10-22 08:00:00
> Now, the denver time should be 8:00, which is what is reported as
> UTC+6, but as far as I know Denver is UTC-6 (in daylight saving). What
> am I missing here?
Timezone names of that form are interpreted per the POSIX standard,
which uses positive for west-of-Greenwich, unlike the ISO standard
which uses the opposite sign. See
https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-TIMEZONES
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2019-10-20 17:14:50 | Re: jsonb_set() strictness considered harmful to data |
Previous Message | Isaac Morland | 2019-10-20 13:42:59 | Re: jsonb_set() strictness considered harmful to data |