[Kde-pim] KTimeZoneSource to Qt5

Sergio Martins iamsergio at gmail.com
Sun Mar 1 16:24:34 GMT 2015


On Sunday, February 22, 2015 19:24:35 John Layt wrote:
> Hi,
> 
> KTimeZoneSource was the backend for each platform, which Qt implements
> in the private class so we shouldn't need one of those for that
> purpose. The implementation model is very different, on it's own it is
> not as complex/flexible as KTimeZone, but most of KTimeZone's
> complexity went unused anyway.  The main thing missing really is the
> automatic caching of loaded QTimeZone objects which was considered not
> appropriate for the main toolkit, so we will need to implement our own
> system for that. I do have Qt patches for a QTimeZoneDatabase class to
> support loading tz files on all platforms including Windows which
> could have a caching policy added if needed, but I've had no time for
> Qt hacking the last 6 months so it's all on hold. Same reason I
> haven't been able to look at porting the tz parts of KCalCore myself
> as I promised.
> 
> Basic custom time zones are supported by the third constructor where
> ianaId is a unique id *not* used by he iana tz file:
> 
> QTimeZone::QTimeZone(const QByteArray & ianaId, int offsetSeconds,
> constQString & name, const QString & abbreviation, QLocale::Country
> country = QLocale::AnyCountry, const QString & comment = QString())
> 
> Supporting anything more complex than simple number of offset seconds,
> i.e. custom dst calculation rules was also considered outside mainline
> Qt's scope at the time. If that is required then we can try address
> that in Qt or by wrapping things. I did have some ideas on that, but
> I've have to dig out my notes to see what those were.

How hard would it be to have something like QTimeZone::setTransitions(), or it's not 
that easy ?

Regards,
Sérgio Martins

> 
> John.
> 
> On 22 February 2015 at 18:42, Sergio Martins <iamsergio at gmail.com> wrote:
> > Hi guys,
> > 
> > 
> > 
> > 
> > 
> > I see KTimeZoneSource is in kdelibs4support, but has no kf5/Qt5
> > counterpart.
> > 
> > 
> > 
> > So we need a KTimeZoneSource based on QDateTime/QTimeZone before starting
> > to port KCalCore to QDateTime I guess ?
> > 
> > 
> > 
> > Also, QTimeZone only accepts iana time zones, not custom ones, like the
> > ones we need to create when reading ical VTIMEZONEs, so we would need to
> > patch Qt ?
> > 
> > 
> > 
> > Regards,
> > 
> > Sérgio Martins

_______________________________________________
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