datetime error? - Mailing list pgsql-hackers

From Karel Zak
Subject datetime error?
Date
Msg-id 20020102120324.A11749@zf.jcu.cz
Whole thread Raw
Responses Re: datetime error?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,
I start fix my bug with "YY vs. zero" in formatting.c, and before ita see current CVS:

test=# select to_timestamp('10-10-2001', 'MM-DD-YYYY');     to_timestamp
------------------------2001-10-10 00:00:00+02
(1 row)

test=# select to_date('10-10-2001', 'MM-DD-YYYY'); to_date
------------2001-10-09        ^^    It looks like bug in to_date(), but here is no real code of 
to_date(), because to_date and to_timastamp use same code:

Datum
to_date(PG_FUNCTION_ARGS)
{       /*        * Quick hack: since our inputs are just like to_timestamp, hand over        * the whole input info
struct...       */       return DirectFunctionCall1(timestamp_date, to_timestamp(fcinfo));
 
}

What are you mean?  
           Karel


-- Karel Zak  <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/C, PostgreSQL, PHP, WWW, http://docs.linux.cz,
http://mape.jcu.cz


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: problems with new vacuum (??)
Next
From: Hannu Krosing
Date:
Subject: how to watch parse/plan trees