KDECore
KTimezones Class Reference
The KTimezones class models a timezone database. More...
#include <ktimezones.h>
Public Types | |
| typedef QMap< QString, KTimezone * > | ZoneMap |
Public Member Functions | |
| void | add (KTimezone *zone) |
| const ZoneMap | allZones () |
| KTimezones () | |
| const KTimezone * | local () |
| const KTimezone * | zone (const QString &name) |
| ~KTimezones () | |
Detailed Description
The KTimezones class models a timezone database.It supports system timezones, and also has support for private timezone entries.
- Since:
- 3.5
Definition at line 296 of file ktimezones.h.
Member Typedef Documentation
| typedef QMap<QString, KTimezone *> KTimezones::ZoneMap |
Definition at line 326 of file ktimezones.h.
Constructor & Destructor Documentation
| KTimezones::KTimezones | ( | ) |
Definition at line 328 of file ktimezones.cpp.
| KTimezones::~KTimezones | ( | ) |
Definition at line 339 of file ktimezones.cpp.
Member Function Documentation
| void KTimezones::add | ( | KTimezone * | zone | ) |
| const KTimezones::ZoneMap KTimezones::allZones | ( | ) |
| const KTimezone * KTimezones::local | ( | ) |
Returns the local timezone.
The idea of this routine is to provide a robust lookup of the local timezone.
The problem is that on Unix systems, there are a variety of mechanisms for setting this information, and no real way of getting it. For example, if you set your timezone to "Europe/London", then the tzname[] maintained by tzset() typically returns { "GMT", "BST" }. The point of this routine is to actually return "Europe/London" (or rather, the corresponding KTimezone).
- Returns:
- local timezone. If necessary, we will use a series of heuristics which end by returning UTC. We will never return NULL.
Definition at line 480 of file ktimezones.cpp.
Returns the given timezone.
- Parameters:
-
name Name of timezone. Empty is equivalent to UTC.
- Returns:
- named timezone, NULL on error.
Definition at line 622 of file ktimezones.cpp.
The documentation for this class was generated from the following files:
KDE 3.5 API Reference