KSystemTimeZoneBackend

KDE 4.7 PyKDE API Reference

- KDE's Python API

# KSystemTimeZoneBackend Class Reference

`from PyKDE4.kdecore import *`

Inherits: KTimeZoneBackend

## Detailed Description

Backend class for KSystemTimeZone class.

This class implements KSystemTimeZone's constructors and virtual methods. A backend class is required for all classes inherited from KTimeZone to allow KTimeZone virtual methods to work together with reference counting of private data.

Backend class for KSystemTimeZone class

See also:
  KTimeZoneBackend, KSystemTimeZone, KTimeZone

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

## Methods
| __init__ (self, KSystemTimeZoneSource source, QString name, QString countryCode, float latitude, float longitude, QString comment)
KTimeZoneBackend | clone (self)
bool | isDst (self, KTimeZone caller, time_t t)
bool | isDstAtUtc (self, KTimeZone caller, QDateTime utcDateTime)
int | offset (self, KTimeZone caller, time_t t)
int | offsetAtUtc (self, KTimeZone caller, QDateTime utcDateTime)
int | offsetAtZoneTime (self, KTimeZone caller, QDateTime zoneDateTime, int secondOffset)
QByteArray | type (self)

## Method Documentation

__init__ | ( | self, |
|  | KSystemTimeZoneSource | source,
|  | QString | name,
|  | QString | countryCode,
|  | float | latitude,
|  | float | longitude,
|  | QString | comment
| ) |  |  |

Implements KSystemTimeZone.KSystemTimeZone().

KTimeZoneBackend clone | ( |  | self ) |

Creates a copy of this instance.

Returns:
  new copy

bool isDst | ( | self, |
|  | KTimeZone | caller,
|  | time_t | t
| ) |  |  |

Implements KSystemTimeZone.isDst().

Returns whether daylight savings time is in operation at a specified UTC time.

Parameters:

  | caller | calling KSystemTimeZone object
  | t | the UTC time, measured in seconds since 00:00:00 UTC 1st January 1970 (as returned by time(2))

Returns:
  true if daylight savings time is in operation, false otherwise

bool isDstAtUtc | ( | self, |
|  | KTimeZone | caller,
|  | QDateTime | utcDateTime
| ) |  |  |

Implements KSystemTimeZone.isDstAtUtc().

Returns whether daylight savings time is in operation at the given UTC date/time.

Note that system times are represented using time_t. An error occurs if the date falls outside the range supported by time_t.

Parameters:

  | caller | calling KSystemTimeZone object
  | utcDateTime | the UTC date/time. An error occurs if utcDateTime.timeSpec() is not Qt.UTC.

Returns:
  true if daylight savings time is in operation, false otherwise

int offset | ( | self, |
|  | KTimeZone | caller,
|  | time_t | t
| ) |  |  |

Implements KSystemTimeZone.offset().

Returns the offset of this time zone to UTC at a specified UTC time.

The offset is the number of seconds which you must add to UTC to get local time in this time zone.

Parameters:

  | caller | calling KSystemTimeZone object
  | t | the UTC time at which the offset is to be calculated, measured in seconds since 00:00:00 UTC 1st January 1970 (as returned by time(2))

Returns:
  offset in seconds, or 0 if error

int offsetAtUtc | ( | self, |
|  | KTimeZone | caller,
|  | QDateTime | utcDateTime
| ) |  |  |

Implements KSystemTimeZone.offsetAtUtc().

Returns the offset of this time zone to UTC at the given UTC date/time.

The offset is the number of seconds which you must add to UTC to get local time in this time zone.

Note that system times are represented using time_t. An error occurs if the date falls outside the range supported by time_t.

Parameters:

  | caller | calling KSystemTimeZone object
  | utcDateTime | the UTC date/time at which the offset is to be calculated. An error occurs if utcDateTime.timeSpec() is not Qt.UTC.

Returns:
  offset in seconds, or 0 if error

int offsetAtZoneTime | ( | self, |
|  | KTimeZone | caller,
|  | QDateTime | zoneDateTime,
|  | int | secondOffset
| ) |  |  |

Implements KSystemTimeZone.offsetAtZoneTime().

Returns the offset of this time zone to UTC at the given local date/time. Because of daylight savings time shifts, the date/time may occur twice. Optionally, the offsets at both occurrences of dateTime are calculated.

The offset is the number of seconds which you must add to UTC to get local time in this time zone.

Parameters:

  | caller | calling KSystemTimeZone object
  | zoneDateTime | the date/time at which the offset is to be calculated. This is interpreted as a local time in this time zone. An error occurs if zoneDateTime.timeSpec() is not Qt.LocalTime.
  | secondOffset | if non-null, and the zoneDateTime occurs twice, receives the UTC offset for the second occurrence. Otherwise, it is set the same as the return value.

Returns:
  offset in seconds. If zoneDateTime occurs twice, it is the offset at the first occurrence which is returned.

QByteArray type | ( |  | self ) |

Returns the class name of the data represented by this instance.

Returns:
  "KSystemTimeZone"