[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

KDE 3.0.3 Date and TimeZone Patch



I have just finished a patch that fixes the Time Zone, and Date issues with 
KDE 3.0.3 on 3.2.  It's uses a lot of (__OpenBSD__) which I know is not 
recomended.  I've looked over KDE 3.1 in CVS, and they actually use a similar 
method to fix the issue on Solaris, and use a lot of (USE_SOLARIS) to get it 
accomplished.  If anyone is interested take a look at what I've got, it's 
based on a patch submitted a year or more ago from Henrik Berg.

http://www.activeintra.net/openbsd/ports/x11/kde/base3/patches.tgz

My patch fixes:
---
dtime.cpp
Issues:Date is set incorrectly, and reports "Can not set date." even when it 
can

Problems: They use the format mmddHHMMccyy.SS, we use ccyymmddHHMM.SS, report 
an error when exitstatus is not 0

Fixes: Just reordered variables, and told it only to repotr that error if 
exitstatus is 1, which I'm still not sure if this is the correct fix, I 
looked at src/bin/date/date.c and I believe it reports 1 for any error, 
anyone correct me please
---
tzone.cpp
Issues:Empty timezone list, and incorrectly sets timezone to GMT

Problems: They rely on the file zone.tab to fill the timezone list, we do not 
use that file, if the list isn't set to anything it still tries to unlink 
/etc/localtime, this is beyond me why that is even done, finally even when we 
can fill the list, we can't set the current zone, since we don't know what it 
is.

Fixes: This fix creates a temp file, then fills it with a list of 
directories/files in /usr/share/zoneinfo, I set it to not even unlink the 
file on OpenBSD, then we read the link /etc/localtime to find out which of 
those files we are currently using and select it in the timezones list
---
main.cpp
Issues: They set date/time first then timezone

Problems: In openbsd if you set the timezone is adjusts the time I guess, 
someone correct me if I'm wrong

Fixes: This fix sets the timezone, then date/time
--

Just untar this file in x11/kde/base3, then make as usual

This is a first draft of the patch, I actually don't really intend to do a lot 
of tweaking, since there are new files that change in 3.1, I will concentrate 
on the new stuff, and try to get it into 3.1.  And I am aware of some stupid 
programming in there, ala ZONEINFODIR, but this will be included in 3.1 
anyways...blah blah blah

Please test and I will send a refined version to the maintainer_(_at_)_kde

Flinn Mueller



Visit your host, monkey.org