Re: date_part bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: salva(at)ronincoders(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: date_part bug?
Date: 2001-03-28 15:55:37
Message-ID: 18217.985794937@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Salvador =?iso-8859-1?Q?Main=E9?= <salvamaine(at)yahoo(dot)com> writes:
> I'm using postgres 7.0.2. When I use date_part('day', date) sometimes I
> get wrong values. Ie:
> and date_part('day', '1999-3-28')=27
> and date_part('day', '2000-3-26')=25

If those dates are daylight-savings transition days where you live,
then this is a known bug (date-to-timestamp conversion is off one hour
on such dates). It's fixed for 7.1.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2001-03-28 16:27:48 Re: A crashing query
Previous Message Tom Lane 2001-03-28 15:22:56 Re: pg_dump potential bug