From kmail-devel Sun Mar 31 19:27:13 2002 From: Zack Rusin Date: Sun, 31 Mar 2002 19:27:13 +0000 To: kmail-devel Subject: Re: Abstracting date handling. X-MARC-Message: https://marc.info/?l=kmail-devel&m=101760283318256 On Sunday 31 March 2002 22:25, Marc Mutz wrote: > Hm, the ::zone() method seems expensive to me. Can't one obtain the > timezone from libc? I remember that localtime() sets a global > variable that contains the offset to GMT, but that could be a > GNU-ism. Ohhh, I forgot about it. I have three versions of that function as there=20 are three ways of getting the zone. The POSIX way is to call tzset()=20 which sets global "timezone" variable holding the difference in seconds=20 between GMT and your local time, the other is the glibc way - glibc=20 adds tm_gmtoff member to struct tm, and stores what timezone variable=20 would hold and the third way is what you saw in the ::zone() which=20 doesn't depend on any of the above but is painfully slow. I'll add=20 checks for the first two to configure.in and make it use the right one. > Personally, I can wait until you have cvs access. Do as you like. Sounds good, I'll fix the ::zone thingy and commit. Zack --=20 Nostalgia: The good old days multiplied by a bad memory... _______________________________________________ KMail Developers mailing list kmail@mail.kde.org http://mail.kde.org/mailman/listinfo/kmail