RFC: addition of generic timezone support to kdelibs

Shaheed srhaque at iee.org
Sun Jul 10 05:03:54 BST 2005


Reinhold wrote:
>Okay. Looking at the class, what I'm missing are
>1) Finding the offset to UTC at any time (not just at the current
> date/time)
> 2) Being able to convert a QDateTime from one KTimezone to 
> another 
> 3) Ability to add custom time zones (if you get an invitation 
> with a VTIMEZONE
>object, it doesn't necessarily match a time zone object that is available
>locally).

I think I have implemented items 1 and 3: perhaps you could take a look to see 
if you have what you need?

For item 3, look in particular at the KTimezoneSource class...all that should 
be needed is to follow the instructions given there. If you need, the is an 
example called DummySource in the .cpp file - and I'd be happy to help of 
course.

For item 2, I think that the building blocks are all there, but I'm not 
exactly sure what the best API would be. For example, would you want 
something like:

	QDateTime convert(const QDateTime &original, const KTimezone *newZone);

added to KTimezone?

Thanks, Shaheed




More information about the kde-core-devel mailing list