Re: Redhat 7.3 time manipulation bug

From: Manuel Sugawara <masm(at)fciencias(dot)unam(dot)mx>
To: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
Cc: PostgreSQL Hackers List <pgsql-hackers(at)postgresql(dot)org>, teg(at)redhat(dot)com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)
Subject: Re: Redhat 7.3 time manipulation bug
Date: 2002-05-21 15:04:00
Message-ID: m3vg9hlfws.fsf@conexa.fciencias.unam.mx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Lamar Owen <lamar(dot)owen(at)wgcr(dot)org> writes:

> On Monday 20 May 2002 08:08 pm, Manuel Sugawara wrote:
> > > Where would we go to ferret out the source of this bug? More to the
> > > point: we need a test case in C that could expose this as a glibc
> > > bug.
>
> > Seems like mktime(3) is having problems with dates before the
> > epoch. Attached is the a program to test this. The glibc source is now
> > downloading I will try to hunt down this bug but not until the next
> > week.
>
> It's not a bug. At least not according to the ISO C standard. See
> http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap04.html#tag_04_14
> for the definition of 'Seconds Since the Epoch', then
> cross-reference to the man page of mktime.

I see. This behavior is consistent with the fact that mktime is
supposed to return -1 on error, but then is broken in every other Unix
implementation that I know.

Any other workaround than downgrade or install FreeBSD?

Regards,
Manuel.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-05-21 15:10:04 Re: Unbounded (Possibly) Database Size Increase - Toasting
Previous Message Tom Lane 2002-05-21 13:57:32 Re: Per tuple overhead, cmin, cmax, OID