Re: [HACKERS] Date/time on glibc2 linux

From: Oleg Broytmann <phd(at)sun(dot)med(dot)ru>
To: Michael Meskes <meskes(at)usa(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Date/time on glibc2 linux
Date: 1998-12-05 13:40:02
Message-ID: Pine.SOL2.3.96.SK.981205163457.1691F-100000@sun.med.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 4 Dec 1998, Michael Meskes wrote:

> On Thu, Dec 03, 1998 at 09:59:42PM +0300, Oleg Broytmann wrote:
> > Well, it looked like an error in glibc2, and I continued. I wrote the
> > program:
> > ...
> >
> > I expected to have results:
> > -----
> > MSK
> > MSK
> > MSD
> > 1
> > -10800
>
> And what did you get? I get this on Debian 2.1:
>
> югЪЪ
> MEZ
> CEST
> 1
> 18000

Definetely wrong! The first 2 lines must be identical - they are
expexted to be your timezone (MSK, in my case).
I got different results on different glibc2-based linux systems, but all
was wrong. On Debian 2.0, e.g.:
-----
MSK
EET
EST
-9200
-----

MSK is Ok here (it is output from strftime()), but other lines (global
variables) are wrong.
Thomas Lockhart gave an idea that global variables cannot be used at all
in thread-safe library, so the problem is - how to detect glibc2 at
configure stage, and how to patch date/time arithmetic in postgres. I am
working on it...

Oleg.
----
Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/
Programmers don't die, they just GOSUB without RETURN.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Broytmann 1998-12-05 16:40:45 Locale fix
Previous Message Vadim Mikheev 1998-12-05 12:19:50 Re: [HACKERS] redolog - for discussion