From: DM <dm.aeqa@gmail.com>
To: Steve Crawford <scrawford@pinpointresearch.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Urgent PST time changing tonight
Date: Mon, 9 Mar 2009 22:11:37 -0700
Message-ID: <eae6a62a0903092211u29459a40ncb5811c15b7811e@mail.gmail.com> (raw)
In-Reply-To: <49B56A7F.6040004@pinpointresearch.com>
References: <eae6a62a0903072358o15b1cefdt661627cefc05b3b0@mail.gmail.com>
<49B56A7F.6040004@pinpointresearch.com>
Thanks Steve for sharing this info.
Thanks
Deepak
On Mon, Mar 9, 2009 at 12:14 PM, Steve Crawford <
scrawford@pinpointresearch.com> wrote:
> DM wrote:
>
>> Hi All,
>>
>> PST time changing tonight, I am not sure if this is going to affect the
>> database....
>>
> IF you are up-to-date on your TZ files the database itself should be fine.
> But external processing is another matter - especially if you have processes
> that assume conventions from previous PG versions. For example:
>
> PG 7.4 (one day = 24 hours):
> select now();
>
> now
> -------------------------------
> 2009-03-09 12:05:42.533139-07
>
> select now()-'2 days'::interval;
> ?column?
> -------------------------------
> 2009-03-07 11:05:43.963526-08
>
>
> But in 8.3 (day interval is DST aware):
> select now();
>
> now
> -------------------------------
> 2009-03-09 12:04:21.813654-07
>
> select now()-'2 days'::interval;
> ?column?
> -------------------------------
> 2009-03-07 12:04:47.693384-08
>
> That's just in the database itself and without cross-country processing
> (i.e.: if you have somewhat synchronized processes that assume that New York
> is 3 hours ahead of San Francisco you can have problems if you don't
> consider that New York changed to DST 3 hours ahead of San Francisco).
>
> Then there are the scripts that calculate dates externally for feeding into
> your database-backed processes (for fun, try "-d yesterday" and "-d
> tomorrow" in most versions of the "date" command in the vicinity of DST
> changes).
>
> Cheers,
> Steve
>
>
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-admin@postgresql.org
Cc: dm.aeqa@gmail.com, scrawford@pinpointresearch.com
Subject: Re: Urgent PST time changing tonight
In-Reply-To: <eae6a62a0903092211u29459a40ncb5811c15b7811e@mail.gmail.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