Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
To: axp-list@redhat.com
Subject: Re: KMail time
Date: Sun, 18 Oct 1998 12:21:41 -0600 (MDT)	[thread overview]
Message-ID: <199810181821.MAA15441@ellpspace.math.ualberta.ca> (raw)
In-Reply-To: <98101819421300.11586@dolph> from "Stefan Katzenbeisser" at Oct 18, 98 07:09:46 pm

Stefan Katzenbeisser wrote:
> 
> I just investigated the kMail time problem (sometimes it prints 48409
> as the current year). This seems to be some strange gmtime() problem. 

It looks to me rather as an ordinary bug in KDE.  One would think 
that in this time and age they would know better.

>     DwUint32 t = aTime + mZone*60;
         ^^^^^
>     gmtime_r(&t, &tt);
              ^^^^

Library headers give:
extern struct tm *gmtime_r __P ((__const time_t *__timer,
                                 struct tm *__tp));

time_t is not 32-bit wide nor guaranteed to be.  Who knows what compiler
is doing with that.  Basically you are passing an address "in vicinity"
and you are getting a garbage.  Not surprising at all.  my_gmtime_r()
has an opportunity to hide such bogus programming - although maybe is
just lucky.

It looks from the above that KDE will suffer from "2038 year bug";
even on 64-bit platforms.

  --mj


      reply	other threads:[~1998-10-18 18:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-18 17:09 KMail time Stefan Katzenbeisser
1998-10-18 18:21 ` Michal Jaegermann [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox