From: Tom Lane <tgl@sss.pgh.pa.us>
To: josh@agliodbs.com
Cc: pgsql-sql@postgresql.org
Cc: pgsql-bugs@postgresql.org
Subject: Re: [SQL] Bug with Daylight Savings Time & Interval
Date: Mon, 20 May 2002 22:47:40 -0400
Message-ID: <17307.1021949260@sss.pgh.pa.us> (raw)
In-Reply-To: <200205201534.32937.josh@agliodbs.com>
References: <200205201534.32937.josh@agliodbs.com>
Josh Berkus <josh@agliodbs.com> writes:
> Found this interesting bug:
> jwnet=> select ('2001-07-31 10:00:00 PST'::TIMESTAMP) + ('249 days'::INTERVAL)
> ;
> ?column?
> ------------------------
> 2002-04-06 10:00:00-08
> (1 row)
> jwnet=> select ('2001-07-31 10:00:00 PST'::TIMESTAMP) + ('250 days'::INTERVAL)
> ;
> ?column?
> ------------------------
> 2002-04-07 11:00:00-07
This isn't a bug per the existing definition of INTERVAL. '250 days' is
defined as '250*24 hours', exactly, no more no less. When you move
across a DST boundary you get behavior like the above.
I've opined several times that interval should account for three
separate units: months, days, and seconds. But our time-meister
Tom Lockhart doesn't seem to have taken any interest in the idea.
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, josh@agliodbs.com, pgsql-bugs@postgresql.org
Subject: Re: [SQL] Bug with Daylight Savings Time & Interval
In-Reply-To: <17307.1021949260@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