From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 609 invoked from network); 18 Oct 1998 18:29:40 -0000 Received: from mail.redhat.com (199.183.24.239) by mail2.redhat.com with SMTP; 18 Oct 1998 18:29:40 -0000 Received: from ellpspace.math.ualberta.ca (michal@ellpspace.math.ualberta.ca [129.128.88.19]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id OAA22110 for ; Sun, 18 Oct 1998 14:21:49 -0400 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.8.8/8.8.8) id MAA15441 for axp-list@redhat.com; Sun, 18 Oct 1998 12:21:42 -0600 From: Michal Jaegermann Message-Id: <199810181821.MAA15441@ellpspace.math.ualberta.ca> Subject: Re: KMail time To: axp-list@redhat.com Date: Sun, 18 Oct 1998 12:21:41 -0600 (MDT) In-Reply-To: <98101819421300.11586@dolph> from "Stefan Katzenbeisser" at Oct 18, 98 07:09:46 pm Content-Type: text 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