datetime error?

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: datetime error?
Date: 2002-01-02 11:03:24
Message-ID: 20020102120324.A11749@zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hi,

I start fix my bug with "YY vs. zero" in formatting.c, and before it
a 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(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/

C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2002-01-02 13:25:10 how to watch parse/plan trees
Previous Message Hannu Krosing 2002-01-02 10:55:56 Re: problems with new vacuum (??)