Re: Redhat 7.3 time manipulation bug

From: cbbrowne(at)cbbrowne(dot)com
To: PostgreSQL Hackers List <pgsql-hackers(at)postgresql(dot)org>
Cc: Ulrich Drepper <drepper(at)redhat(dot)com>
Subject: Re: Redhat 7.3 time manipulation bug
Date: 2002-05-23 15:02:03
Message-ID: 20020523150203.9ECD335D83@cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> --=-Z1lifK4QZqKV8kHqHfYT
> Content-Type: text/plain
> Content-Transfer-Encoding: quoted-printable
>
> On Wed, 2002-05-22 at 10:51, Lamar Owen wrote:
>
> > What isn't funny is Oliver Elphick's results on Debian, running glibc 2.2=
> .5=20
> > (same as Red Hat 7.3's version).
>
> This is a completely different version. Once Debian updates (in a few
> years) they'll get the same result.
>
> If you are misusing interfaces you get what you deserve. At no time was
> it correct to use these functions for general date manipulation. It
> always only was allowed to use them to represent system times and there
> was no Unix system before the epoch. Therefore you argumentation is
> completely wrong.
>
> If you need date manipulation write your own code which work for all the
> times you want to represent.

This is indeed a problem with dates on LIBC, because even if it is
theoretically satisfactory to describe dates within some range within 2^31
seconds of 1970, that is certainly NOT satisfactory for describing all dates
of interest unless you're being terribly parochial about what is to be
considered "of interest."

My father's birth falls within 2^31 seconds of 1970, but the Battle of
Agincourt doesn't.

Any backup of any Unix system in history falls within 2^31 seconds of 1970,
but there are people alive whose births don't.

People get away with using Unix dates as a "general" date type when they don't
have to work outside a limited range. If/when there is a move to 64 bit
values, that will provide something with enough range to cover history back to
ridiculously early times, relieving the limit.

But anybody using Unix dates as "general dates" has leaped into exactly the
same sort of trap that caused people to get so paranoid about Y2K.
--
(concatenate 'string "cbbrowne" "@acm.org")
http://www.cbbrowne.com/info/oses.html
Do Roman paramedics refer to IV's as "4's"?

--
(concatenate 'string "aa454" "@freenet.carleton.ca")
http://www.ntlug.org/~cbbrowne/linuxxian.html
"So, when you typed in the date, it exploded into a sheet of blue
flame and burned the entire admin wing to the ground? Yes, that's a
known bug. We'll be fixing it in the next release. Until then, try not
to use European date format, and keep an extinguisher handy."
-- slam(at)pobox(dot)com (Tequila Rapide)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message cbbrowne 2002-05-23 16:17:09 Re: Redhat 7.3 time manipulation bug
Previous Message Tom Lane 2002-05-23 15:00:32 Re: tuples gone?