On Mon, Oct 24, 2005 at 11:21:52PM -0400, Tom Lane wrote:
> Klint Gore <kg@kgb.une.edu.au> writes:
> > That's changed since v7.4.7
>
> Yup. '1 week' = '7 days' which is no longer the same as 7*24 hours.
> In particular, as of 8.1 local noon plus one day is still local noon,
> even if there was a DST change in between. Adding 24 hours, on the
> other hand, might give 11am or 1pm.
Should 24 hours be the same as 1 * 24 hours? The latter appears
to be equal to 1 day, not 24 hours:
test=> SELECT '2005-10-29 12:00:00-06'::timestamptz + '24 hours'::interval;
?column?
------------------------
2005-10-30 11:00:00-07
(1 row)
test=> SELECT '2005-10-29 12:00:00-06'::timestamptz + 1 * '24 hours'::interval;
?column?
------------------------
2005-10-30 12:00:00-07
(1 row)
test=> SELECT '2005-10-29 12:00:00-06'::timestamptz + '1 day'::interval;
?column?
------------------------
2005-10-30 12:00:00-07
(1 row)
--
Michael Fuhr