Adding UTC to timezones

Aaron J. Seigo aseigo at kde.org
Sat Sep 6 18:12:48 BST 2008


On Saturday 06 September 2008, David Jarvie wrote:
> KSystemTimeZones encapsulates all the time zones defined in the system time
> zone database. If UTC isn't in the database, it will not appear in
> KSystemTimeZones. Because UTC is the basic time zone to which all other
> time zones refer in their definitions, it isn't necessary for the system
> time zone database to include it - it always exists regardless, which is
> why KTimeZone::utc() is able to create a version of it.
>
> If it is convenient in an application to add it to the time zone collection
> returned by KSystemTimeZones::zones(), then by all means do so, although
> your code isn't correct (the return type is 'const KTimeZones::ZoneMap').

...

> To remove a UTC time zone from a collection, it is always safest to find it
> by name "UTC" - there is no guarantee that different collections contain
> the same UTC instance. See the KTimeZone::utc() apidox.

great, so now that we've talked about all the interesting details that one can 
trip up over while simply trying to show UTC to the user in a config dialog ...

... does it now make sense to you that KTimeZoneWidget provides an option to 
show UTC so that we can encapsulate all these details and make it fool proof?

e.g. KTimeZoneWidget::showUTC(bool show).

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080906/3a5b4d5e/attachment.sig>


More information about the kde-core-devel mailing list