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

Re: timestamp (minor bug)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "And(dot) Andruikhanov" <andy(at)euinf(dot)dp(dot)ua>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: timestamp (minor bug)
Date: 2001-07-29 19:46:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
"And. Andruikhanov" <andy(at)euinf(dot)dp(dot)ua> writes:
> On Sun, 22 Jul 2001, Tom Lane wrote:
>> "And. Andruikhanov" <andy(at)euinf(dot)dp(dot)ua> writes:
> Wrong result in timestamp value between "winter" and "summer" time:
>> Could you trace through the timestamp conversion routines and determine
>> exactly what's going wrong?  The problem is most likely in or near
>> DetermineLocalTimeZone() in src/backend/utils/adt/datetime.c.  We've

> This function returns 0, when
> tm->tm_hour = 3;
> tm->tm_min = 0;
> tm->tm_sec = 0;
> tm->tm_year=2001;
> tm->tm_mon=3;
> tm->tm_mday=25;

> otherwise it returns correctly tm_gmtoff. (in config.h HAVE_TM_ZONE defined
> as 1)

That's not the whole story, however.  Returning zero would cause the
time to be interpreted as GMT rather than your local time, which would
make for an error of a couple of hours, not thirty-plus years.  It looks
to me like a garbage value must have been added to the time value
somewhere.  Could you dig further and determine where?

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2001-07-29 22:15:04
Subject: Re: [GENERAL] HELP! BUG? pg_dump mucks up grant/revoke
Previous:From: Tom LaneDate: 2001-07-29 19:39:29
Subject: Re: HELP! BUG? pg_dump mucks up grant/revoke

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