From: Tom Lane <tgl@sss.pgh.pa.us>
To: Luca Ferrari <fluca1978@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: UTC-6 or UTC+6?
Date: Sun, 20 Oct 2019 10:10:45 -0400
Message-ID: <12910.1571580645@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKoxK+4JuhZiuODdf_103_gEPMa69D1Dhm+qn6PqNmMkTo4nZA@mail.gmail.com>
References: <CAKoxK+4JuhZiuODdf_103_gEPMa69D1Dhm+qn6PqNmMkTo4nZA@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, fluca1978@gmail.com
Subject: Re: UTC-6 or UTC+6?
In-Reply-To: <12910.1571580645@sss.pgh.pa.us>
References: <CAKoxK+4JuhZiuODdf_103_gEPMa69D1Dhm+qn6PqNmMkTo4nZA@mail.gmail.com> <12910.1571580645@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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