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

Date Conversion Bug

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Date Conversion Bug
Date: 2001-04-30 12:29:21
Message-ID: 200104301229.f3UCTL651012@hub.org (view raw or flat)
Thread:
Lists: pgsql-bugs
Ayal Leibowitz (ayal(at)modelity(dot)com) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Date Conversion Bug

Long Description
Hi,

I encountered this bug in Postgres version 6.5 to 7.1 and on RedHat Linux versions 6.1 to 7.1.

It's similar or even identical to bugs #208 and #249, but I want to clarify a little more.

It looks like Postgres refers to the time zone when converting character string to date type. For example, when I type:
select date('1993-04-02') from xxx;
I get 1993-04-01 for each line in xxx.
My default time zone is GMT+2. If I type: set time zone 'gmt'; before the above query the result is as expected: 1993-04-02.

To my understanding, date shouldn't be influenced by the time zone, only the time and timestamp types. This is the reason why the newly version 7.1 "WITHOUT TIME ZONE" type qualifier does not relate to the date type.

Like specified in #249, it happens only on the switch from normal to daylight saving time.

Ayal Leibowitz,
Modelity Technologies.

Sample Code
select date('1993-04-02') from xxx;

results with 1993-04-01 in psql.

No file was uploaded with this report


Responses

pgsql-bugs by date

Next:From: Thomas LockhartDate: 2001-04-30 15:02:08
Subject: Re: v7.1.1 branched and released on Tuesday ...
Previous:From: pgsql-bugsDate: 2001-04-30 12:20:36
Subject: Postgresql is not starting

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