RES: RES: Dates rejected
От | Carlos H. Reimer |
---|---|
Тема | RES: RES: Dates rejected |
Дата | |
Msg-id | PEEPKDFEHHEMKBBFPOOKOELKDFAA.carlos.reimer@opendb.com.br обсуждение исходный текст |
Ответ на | Re: RES: Dates rejected (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-general |
Hi Tom, You are right, I´ve discovered that the to_date was changed to return a timestamp, the original function is returning the right values. The to_date I´ve found: CREATE OR REPLACE FUNCTION PUBLIC.TO_DATE(text, text) RETURNS TIMESTAMP AS ' BEGIN RETURN pg_Catalog.TO_TIMESTAMP($1,$2); END; ' language 'plpgsql'; I don´t know why they have changed it but anyway why is this changed function returning 01:00:00 in the hour field only for the date 15/10/2006 (DD/MM/YYYY)? It started happening in the first day when Linux has changed to the day light time (15/10/2006). Thanks in advance! Carlos > -----Mensagem original----- > De: Tom Lane [mailto:tgl@sss.pgh.pa.us] > Enviada em: segunda-feira, 16 de outubro de 2006 16:27 > Para: carlos.reimer@opendb.com.br > Cc: Andreas Kretschmer; Pgsql-General@Postgresql.Org > Assunto: Re: RES: [GENERAL] Dates rejected > > > "Carlos H. Reimer" <carlos.reimer@opendb.com.br> writes: > > select to_date('16/10/2006','DD/MM/YYYY'); > > to_date > > --------------------- > > 2006-10-16 00:00:00 > > (1 row) > > Um... what have you done to to_date()? The standard version returns a > date, not a timestamp: > > regression=# select to_date('15/10/2006','DD/MM/YYYY'); > to_date > ------------ > 2006-10-15 > (1 row) > > > regards, tom lane > >
В списке pgsql-general по дате отправления: