KTzfileTimeZoneSource

KDE 4.5 PyKDE API Reference

- KDE's Python API

# KTzfileTimeZoneSource Class Reference

`from PyKDE4.kdecore import *`

Inherits: KTimeZoneSource

## Detailed Description

A class to read and parse tzfile time zone definition files.

tzfile is the format used by zoneinfo files in the system time zone database. The format is documented in the tzfile(5) manpage.

Reads and parses tzfile(5) time zone definition files

See also:
  KTzfileTimeZone, KTzfileTimeZoneData

Author:
  David Jarvie <djarvie@kde.org>.

## Methods
| __init__ (self, QString location)
QString | location (self)
KTimeZoneData | parse (self, KTimeZone zone)

## Method Documentation

__init__ | ( | self, |
|  | QString | location
| ) |  |  |

Constructs a time zone source.

The directory containing the time zone definition files is given by the location parameter, which will usually be the zoneinfo directory. For tzfile files in other locations, bear in mind that the name generated for each KTzfileTimeZone is its file path relative to location.

Parameters:

  | location | the local directory containing the time zone definition files

QString location | ( |  | self ) |

Returns the local directory containing the time zone definition files.

Returns:
  path to time zone definition files

KTimeZoneData parse | ( | self, |
|  | KTimeZone | zone
| ) |  |  |

Parses a tzfile file to extract detailed information for one time zone.

Parameters:

  | zone | the time zone for which data is to be extracted

Returns:
  a KTzfileTimeZoneData instance containing the parsed data. The caller is responsible for deleting the KTimeZoneData instance. Null is returned on error.