Re: Is this a bug? : select '26/10/2003'::date + interval

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: <cmarin(at)dims(dot)com>
Cc: "Pgsql-General-post (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is this a bug? : select '26/10/2003'::date + interval
Date: 2003-05-22 16:13:22
Message-ID: 20030522091054.V37537-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 22 May 2003, [iso-8859-1] Conxita Marn wrote:

> Hi.
>
> Is this a bug?
>
> s001=> select '25/10/2003'::date + interval '1 day';
> ?column?
> --------------------------
> 26/10/2003 00:00:00 CEST
> (1 row)
>
> s001=> select '26/10/2003'::date + interval '1 day';
> ?column?
> -------------------------
> 26/10/2003 23:00:00 CET (????)
> (1 row)

Is that your daylight savings time changeover point (appears to be from
the output, but it's worth checking). IIRC '1 day' is taken as equivalent
to 24 hours which because of the time zone switch causes the above (it'd
presumably be 27/10/2003 00:00:00 CEST but that's not your timezone
anymore).

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2003-05-22 16:21:59 Re: Is this a bug? : select '26/10/2003'::date + interval '1 day';
Previous Message Bruno Wolff III 2003-05-22 15:49:57 Re: SELECT DISTINCT ON bug?