Re: Date 1973/06/03 Conversion Problem in 7.3.4 and 7.3.2. - Mailing list pgsql-bugs

From Torello Querci
Subject Re: Date 1973/06/03 Conversion Problem in 7.3.4 and 7.3.2.
Date
Msg-id 200309101611.56179.querci@negens.com
Whole thread Raw
In response to Re: Date 1973/06/03 Conversion Problem in 7.3.4 and 7.3.2.  (Karel Zak <zakkr@zf.jcu.cz>)
List pgsql-bugs
On 7.3.2 and 7.3.4 obtain the same result:

template1=3D# select '03/06/1973'::date;
    date
------------
 1973-03-06
(1 row)

template1=3D# select '02/06/1973'::date;
    date
------------
 1973-02-06
(1 row)

template1=3D# select '06/03/1973'::date;
    date
------------
 1973-06-03
(1 row)

template1=3D# select '06/02/1973'::date;
    date
------------
 1973-06-02
(1 row)




I suppose that the problem is related to the timezone. I make this test:



template1=3D# select to_timestamp('1973/06/03','yyyy/mm/dd');
      to_timestamp
------------------------
 1973-06-02 23:00:00+01
(1 row)

template1=3D# select to_timestamp('1973/06/02','yyyy/mm/dd');
      to_timestamp
------------------------
 1973-06-02 00:00:00+01
(1 row)

template1=3D# select to_timestamp('1973/06/04','yyyy/mm/dd');
      to_timestamp
------------------------
 1973-06-04 00:00:00+02


Alle 15:33, mercoled=EC 10 settembre 2003, hai scritto:
> On Wed, Sep 10, 2003 at 12:52:22PM +0200, Torello Querci wrote:
> > Hi to all,
> >
> > I have a problem storing 1973/06/03 date.
> >
> > If I send this statement
> >
> >     select to_date('03/06/1973','dd/mm/yyyy');
> >
> > in the psql interface I obtain
> >
> >  to_date
> > ------------
> >  1973-06-02
> >
> > I test this statement with Postgres 7.3.2 and 7.3.4 packaged withMandra=
ke
> > 9.1 and Mandrake 9.2RC1 and obtain the same result.
> >
> > Can anyone help me?
>
>  What's happen if you try:
>
> test=3D# select '03/06/1973'::date;
>     date
> ------------
>  1973-06-03

pgsql-bugs by date:

Previous
From: "Loeke"
Date:
Subject: Postgres Pam Ldap (Debian)
Next
From: Torello Querci
Date:
Subject: Re: Date 1973/06/03 Conversion Problem in 7.3.4 and 7.3.2.