Silvio Macedo wrote:
> 
> On Wed, 29 Mar 2000, Stefan Loidl wrote:
> > I'm currently using postgres 6.4.2 on Sun Solaris.
> > There seems to be a strange bug in the date_part() function.
> > See below:
> >
> > accounting=> SELECT date_part('day','03-26-2000'::date);
> 
> I've tested it with PG6.5.3 on Intel/Linux - no prob here.
> 
> Could it be because of the 29th of Feb, 2000 ?
> Could you try 2nd of March 2000, and 27th of Feb 2000 ?
> Maybe thats an OS level issue...
> 

I tried the two and the result is correct.

I also tested a few other things and it seems that the
problem has something to do with the beginning of
summertime (daylight saving time: DST) in europe on March 26 (?)
(column timestamp in the example is of type date):

accounting=> select
timestamp,timestamp::datetime,date_part('day',timestamp)  
                    from dbblabdayatdates where timestamp='03-26-2000';
 timestamp|datetime                    |date_part
----------+----------------------------+---------
03-26-2000|Sat Mar 25 23:00:00 2000 MET|       25

I don't think that this can be correct, because the time
was switched from 02:00:00 to 03:00:00 on this day?

Greetings,
Stefan

-- 
Stefan Loidl                    Phone:  +49 89 289-28882
Leibniz-Rechenzentrum           Fax:    +49 89 2809460
Barer Str. 21                   mailto:[EMAIL PROTECTED]
80333 Munich, Germany           http://www.lrz.de

Reply via email to