From: Laszlo Nagy <gandalf@shopzeus.com>
To: JC de Villa <jc.devilla@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Messed up time zones
Date: Fri, 03 Aug 2012 11:18:35 +0200
Message-ID: <501B976B.8060700@shopzeus.com> (raw)
In-Reply-To: <CAOvw+NbbtoN7ehSmnAg=wutMZiimguXb4uYha8OEYE69xyJGTg@mail.gmail.com>
References: <501B8C6F.6040100@shopzeus.com>
<CAOvw+NbbtoN7ehSmnAg=wutMZiimguXb4uYha8OEYE69xyJGTg@mail.gmail.com>
>
> Isn't:
>
> select now() at time zone 'Australia/ATC'
>
> supposed to be:
>
> select now() at time zone 'Australia/ACT'
I see now. The abbreviation is usually a time zone name. But to be
correct, the time zone name should be used (and not the abbreviation).
>
> And looking at the pg_timezone_names table for EST, there's only one
> entry for EST:
>
> SELECT * from pg_timezone_names where name = 'EST';
> name | abbrev | utc_offset | is_dst
> ------+--------+------------+--------
> EST | EST | -05:00:00 | f
Okay, but that is the "name", and not the "abbrev" field. So time zone
abbreviations are not unique? Then probably it is my fault - I thought
that they will be unique. It is still an interesting question, how
others interpret these (non-unique) abbreviations? But I guess that is
not related to PostgreSQL so I'm being offtopic here.
One last question. Am I right in that PostgreSQL does not handle leap
seconds?
template1=> set time zone 'UTC';
template1=> select '2008-12-31 23:59:60'::timestamp;
timestamp
---------------------
2009-01-01 00:00:00
(1 row)
And probably intervals are affected too:
template1=> set time zone 'UTC';
template1=> select '2008-12-31 00:00:00'::timestamp + '48 hours'::interval;
timestamp
---------------------
2009-01-02 00:00:00
(1 row)
Should be '2009-01-01 23:59:59' instead.
Thanks,
Laszlo
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: gandalf@shopzeus.com, jc.devilla@gmail.com, pgsql-admin@postgresql.org
Subject: Re: Messed up time zones
In-Reply-To: <501B976B.8060700@shopzeus.com>
* 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