RES: RES: Dates rejected

From: "Carlos H(dot) Reimer" <carlos(dot)reimer(at)opendb(dot)com(dot)br>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Andreas Kretschmer" <akretschmer(at)spamfence(dot)net>, "Pgsql-General(at)Postgresql(dot)Org" <pgsql-general(at)postgresql(dot)org>
Subject: RES: RES: Dates rejected
Date: 2006-10-16 20:30:11
Message-ID: PEEPKDFEHHEMKBBFPOOKOELNDFAA.carlos.reimer@opendb.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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: pgsql-general-owner(at)postgresql(dot)org
> [mailto:pgsql-general-owner(at)postgresql(dot)org]Em nome de Tom Lane
> Enviada em: segunda-feira, 16 de outubro de 2006 16:27
> Para: carlos(dot)reimer(at)opendb(dot)com(dot)br
> Cc: Andreas Kretschmer; Pgsql-General(at)Postgresql(dot)Org
> Assunto: Re: RES: [GENERAL] Dates rejected
>
>
> "Carlos H. Reimer" <carlos(dot)reimer(at)opendb(dot)com(dot)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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message AgentM 2006-10-16 20:33:10 Re: A query planner that learns
Previous Message Madison Kelly 2006-10-16 20:17:58 Re: A query planner that learns