[Kde-pim] About KOrganizer's timezone setting
David Jarvie
lists at astrojar.org.uk
Mon Jul 30 15:19:29 BST 2007
On Monday 30 July 2007 14:26, Allen Winter wrote:
> On Monday 30 July 2007 9:20:54 am Bruno Virlet wrote:
>> Hello !
>>
>> > The idea is as follows :
>> > - The calendar displays local times by default
>> > - When you add an event, you add it by default with local times but
>> you
>> > have the ability to change to another timezone if prefered.
>> > - You can obviously change an event timezone.
>> > - You can possibly change the display timezone of the calendar
>> > - Changing the display timezone doesn't change any event info, it only
>> > change the position of the events to match the choosen timezone.
>>
>> I have begun to implement this to see the result. I have something which
>> seems
>> functional at first glance (you can choose your event timezone and edit
>> it,
>> when you change the timezone in the settings it's taken in account and
>> the
>> events position change in the view).
>
>> - Adding timezone info impacts a lot of code because each
>> incidence->dtStart()
>> (and dtEnd()) has to be converted to KOPrefs::instance()->timeSpec() for
>> instance. Do we want this to impact todos, journals, blogs too ?
>
> David already thought about this alot.
> I hope he will respond with the best way to handle this.
incidence->dtStart() and dtEnd() are already KTimeZone values. So any
conversions for viewing should be handled very easily. If you need to
convert incidences to a different time zone in the calendar, preserving
the time-of-day (e.g. if it's currently 07:00 EST and you want to convert
the stored value to 07:00 CET), there is a shiftTimes() method to do this.
If there is something else that you don't think caters for KDateTime,
please let me know.
>> - Their are functions in kcal which are still QDate-only (eg. the
>> functions
>> events(QDate date) which gives a list of events at the given date, but
>> without timezone specification, so this is useless). There are maybe
>> others ?
>> I think it is worth changing that to have a good timezone support. But
>> is it
>> still possible to make changes in kdepimlibs ? And how much code will
>> this
>> impact then in other kde modules ?
>>
>
> David put a hell of a lot of work into providing "working" timezone
> support
> into our core libs. We need to use that work.
>
> Yes, we can change kcal where needed to QDateTime -> KDateTime
> There shouldn't be much impact outside of kdepim.
As I have already said to Bruno privately, I agree that events(QDate)
isn't satisfactory. events(KDateTime) should handle the time zone in the
KDateTime parameter (currently it ignores it). And either events(QDate)
should be removed, or it should have an additional KDateTime::Spec
parameter to specify the time zone. Opinions?
--
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list