Hi,

The problem is related with the to_timestamp function that returns +1 hour
offset only for the date 15/10/2006. The 15th october is the first day of
our day light change.

template1=# select pg_catalog.to_timestamp('15/10/2006','dd/mm/yyyy') as
date;
          date
------------------------
 2006-10-15 01:00:00-02
(1 row)

Why is this offset present only for date 15/10/2006 (DD/MM/YYY)?

Carlos


> -----Mensagem original-----
> De: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] nome de Tom Lane
> Enviada em: segunda-feira, 16 de outubro de 2006 16:27
> Para: [EMAIL PROTECTED]
> Cc: Andreas Kretschmer; Pgsql-General@Postgresql.Org
> Assunto: Re: RES: [GENERAL] Dates rejected
>
>
> "Carlos H. Reimer" <[EMAIL PROTECTED]> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq
>
>


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to