From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 3194 invoked from network); 18 Oct 1998 17:51:23 -0000 Received: from mail.redhat.com (199.183.24.239) by mail2.redhat.com with SMTP; 18 Oct 1998 17:51:23 -0000 Received: from stud3.tuwien.ac.at (root@stud3.tuwien.ac.at [193.170.75.13]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id NAA20055 for ; Sun, 18 Oct 1998 13:43:32 -0400 Received: from dolph (katz@e49.dialin.tuwien.ac.at [192.35.243.239]) by stud3.tuwien.ac.at (8.8.6/8.8.6) with SMTP id TAA10816 for ; Sun, 18 Oct 1998 19:43:20 +0200 (METDST) From: Stefan Katzenbeisser To: axp-list@redhat.com Subject: KMail time Date: Sun, 18 Oct 1998 19:09:46 +0200 X-Mailer: KMail [version 0.7.9] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <98101819421300.11586@dolph> Content-Transfer-Encoding: 8bit I just investigated the kMail time problem (sometimes it prints 48409 as the current year). This seems to be some strange gmtime() problem. kMail executes the routine _FromUnixTime from the MIMELIB (datetime.cpp) twice when it starts up (don't ask me why...) void DwDateTime::_FromUnixTime(DwUint32 aTime) { printf("Executing _FromUnixTime with %d\n", aTime); DwUint32 t = aTime + mZone*60; #if defined(USE_PORTABLE_GMTIME) struct tm tt; my_gmtime_r(&t, &tt); #elif defined(HAVE_GMTIME_R) struct tm tt; gmtime_r(&t, &tt); #else printf("gmtime called with %d\n", t); struct tm tt = *gmtime((time_t*)&t); #endif mYear = tt.tm_year + 1900; mMonth = tt.tm_mon + 1; mDay = tt.tm_mday; mHour = tt.tm_hour; mMinute = tt.tm_min; mSecond = tt.tm_sec; printf("Result: %d\n", mYear); } This is the output when kMail starts up: Executing _FromUnixTime with 908730326 gmtime called with 908737526 Result: 1998 Executing _FromUnixTime with 908730326 gmtime called with 908737526 Result: 48409 gmtime() gives two *different* results???? In order to avoid that problem, recompile MIMELIB with the -DUSE_PORTABLE_GMTIME option and recompile KDE. kMail works fine then. Best, S.K. -- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- | Stefan Katzenbeisser | e-mail: skatzenbeisser@acm.org | http://stud3.tuwien.ac.at/~e9625414/ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Public PGP key available on my homepage or upon request.