[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    [Kde-pim] Date/time handling changes in libkcal
From:       David Jarvie <lists () astrojar ! org ! uk>
Date:       2006-09-11 17:10:09
Message-ID: 200609111810.09930.lists () astrojar ! org ! uk
[Download RAW message or body]

As you will see from the two commit messages, I have now converted libkcal to 
use KDateTime instead of QDateTime for handling date/time values. This should 
enable applications to automatically handle time zone changes and time zone 
shifts - something which will fix some long-standing bugs for KOrganizer and 
KAlarm and possibly other applications too.

Now, when a calendar is read in, its date/time values are NOT converted to the 
viewing time zone. Instead they are kept as they are specified in the 
calendar. This will allow applications to read and write calendars without 
data loss, preserving time zone information. Now, date/time values are 
converted to the viewing time zone as and when required. So the viewing time 
zone becomes purely a matter for the client application - libkcal does not 
need to know about it at all. (There is still a convenience method in 
KCal::Calendar to set the viewing time zone, but all that it now does is to 
act as a notepad for the application - the Calendar class makes no use of the 
information.)

I have already done some work on improving the efficiency of time zone 
conversions in KDateTime and the KTimeZone classes, and I am currently 
working on caching the last converted time so that repeatedly asking for a 
conversion to the viewing time zone will simply return the cached value 
rather than recalculating it. That work should be done within the next week.

I haven't converted all the kcal test programs yet, and some of them still 
fail - again, I'll be tackling this soon. But at least I won't be chasing a 
moving target any more as I have been for the past couple of months while 
I've been working on all this.

Obviously, there are liable to be some bugs in the new code. If any of you 
need explanations of specific changes, or need help in understanding the 
approach I've taken, please ask. And if you encounter systematic errors, also 
let me know.

-- 
David Jarvie.
KAlarm author and maintainer.
http://www.astrojar.org.uk/linux/kalarm.html
_______________________________________________
kde-pim mailing list
kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic