Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group