Timezone in formatDateTime()

Bruno Virlet bruno at virlet.org
Thu Aug 2 17:57:37 BST 2007


Hi,

I'm working on adding the timezones in korganizer (eg. you can add an event 
with a different timezone than your local timezone, useful for travels etc.)

To display their date and time, events use methods from kdepimlibs (eg. 
dtStartTimeStr( KDateTime::Spec& spec )) which convert the event date/time to 
the given spec, and then pass it to KGlobal::locale()->formatDateTime()).

This returns something like "12:23" for instance. The problem is that it has 
no meaning if it's not your local timezone.  We could add a check 
dt.timeSpec().timeZone() != localTimeZone which would concatenate the time 
zone string to the date/time.

Allen and I wondered if this should not be in kdelibs (it can also concern 
other applications) or if it should stay at kdepimlibs level (anyway, it's 
probably too late for kdelibs ?)

Thanks !

Bruno




More information about the kde-core-devel mailing list