KTimeZones Class Reference
from PyKDE4.kdecore import *
Detailed Description
The KTimeZones class represents a time zone database which consists of a collection of individual time zone definitions.
Each individual time zone is defined in a KTimeZone instance, which provides generic support for private or system time zones. The time zones in the collection are indexed by name, which must be unique within the collection.
Different time zone sources could define the same time zone differently. (For example, a calendar file originating from another system might hold its own time zone definitions, which may not necessarily be identical to your own system's definitions.) In order to keep conflicting definitions separate, it will often be necessary when dealing with multiple time zone sources to create a separate KTimeZones instance for each source collection.
If you want to access system time zones, use the KSystemTimeZones class.
Represents a time zone database or collection
Methods | |
__init__ (self) | |
__init__ (self, KTimeZones a0) | |
bool | add (self, KTimeZone zone) |
clear (self) | |
KTimeZone | remove (self, KTimeZone zone) |
KTimeZone | remove (self, QString name) |
KTimeZone | zone (self, QString name) |
{QString:KTimeZone} | zones (self) |
Method Documentation
__init__ | ( | self ) |
__init__ | ( | self, | ||
KTimeZones | a0 | |||
) |
bool add | ( | self, | ||
KTimeZone | zone | |||
) |
Adds a time zone to the collection. The time zone's name must be unique within the collection.
- Parameters:
-
zone time zone to add
- Returns:
- true if successful, false if zone's name duplicates one already in the collection
- See also:
- remove()
clear | ( | self ) |
Clears the collection.
- See also:
- remove()
Removes a time zone from the collection.
- Parameters:
-
name name of time zone to remove
- Returns:
- the time zone which was removed, or invalid if not found
- See also:
- clear(), add()
KTimeZone remove | ( | self, | ||
QString | name | |||
) |
Removes a time zone from the collection.
- Parameters:
-
name name of time zone to remove
- Returns:
- the time zone which was removed, or invalid if not found
- See also:
- clear(), add()
KTimeZone zone | ( | self, | ||
QString | name | |||
) |
Returns the time zone with the given name.
- Parameters:
-
name name of time zone
- Returns:
- time zone, or 0 if not found
{QString:KTimeZone} zones | ( | self ) |
Returns all the time zones defined in this collection.
- Returns:
- time zone collection, indexed by time zone name