pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
UTC-6 or UTC+6? 2+ messages / 2 participants [nested] [flat]
* UTC-6 or UTC+6? @ 2019-10-20 09:35 Luca Ferrari <fluca1978@gmail.com> 2019-10-20 14:10 ` Re: UTC-6 or UTC+6? Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 2+ messages in thread From: Luca Ferrari @ 2019-10-20 09:35 UTC (permalink / raw) To: pgsql-general I'm a little confused by trying to get the time at a different timezone, formerly UTC-6: 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? Thanks, Luca ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: UTC-6 or UTC+6? 2019-10-20 09:35 UTC-6 or UTC+6? Luca Ferrari <fluca1978@gmail.com> @ 2019-10-20 14:10 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2019-10-20 14:10 UTC (permalink / raw) To: Luca Ferrari <fluca1978@gmail.com>; +Cc: pgsql-general Luca Ferrari <fluca1978@gmail.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 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-10-20 14:10 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-10-20 09:35 UTC-6 or UTC+6? Luca Ferrari <fluca1978@gmail.com> 2019-10-20 14:10 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox