KTimeZoneBackend

KDE 4.9 PyKDE API Reference

- KDE's Python API

# KTimeZoneBackend Class Reference

`from PyKDE4.kdecore import *`

Subclasses: KSystemTimeZoneBackend, KTzfileTimeZoneBackend

## Detailed Description

Base backend class for KTimeZone classes.

KTimeZone and each class inherited from it must have a corresponding backend class to implement its constructors and its virtual methods, and to provide a virtual clone() method. This allows KTimeZone virtual methods to work together with reference counting of private data.

Note:
  Classes derived from KTimeZoneBackend should not normally implement their own copy constructor or assignment operator, and must have a non-const d-pointer.

Base backend class for KTimeZone classes

See also:
  KTimeZone

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

## Methods
| __init__ (self)
| __init__ (self, QString name)
| __init__ (self, KTimeZoneBackend other)
| __init__ (self, KTimeZoneSource source, QString name, QString countryCode=QString(), float latitude=KTimeZone.UNKNOWN, float longitude=KTimeZone.UNKNOWN, QString comment=QString())
KTimeZoneBackend | clone (self)
bool | hasTransitions (self, KTimeZone caller)
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, int secondOffset | offsetAtZoneTime (self, KTimeZone caller, QDateTime zoneDateTime)
QByteArray | type (self)

## Method Documentation

__init__ | ( |  | self ) |

Implements KTimeZone.KTimeZone().

__init__ | ( | self, |
|  | QString | name
| ) |  |  |

Implements KTimeZone.KTimeZone(const QString&).

__init__ | ( | self, |
|  | KTimeZoneBackend | other
| ) |  |  |

__init__ | ( | self, |
|  | KTimeZoneSource | source,
|  | QString | name,
|  | QString | countryCode=QString(),
|  | float | latitude=KTimeZone.UNKNOWN,
|  | float | longitude=KTimeZone.UNKNOWN,
|  | QString | comment=QString()
| ) |  |  |

Constructs a time zone.

Parameters:

  | source | reader/parser for the database containing this time zone. This will be an instance of a class derived from KTimeZoneSource.
  | name | in system-dependent format. The name must be unique within any KTimeZones instance which contains this KTimeZone.
  | countryCode | ISO 3166 2-character country code, empty if unknown
  | latitude | in degrees (between -90 and +90), UNKNOWN if not known
  | longitude | in degrees (between -180 and +180), UNKNOWN if not known
  | comment | description of the time zone, if any

KTimeZoneBackend clone | ( |  | self ) |

Creates a copy of this instance.

Note:
  Every inherited class must reimplement clone().

Returns:
  new copy

bool hasTransitions | ( | self, |
|  | KTimeZone | caller
| ) |  |  |

Implements KTimeZone.hasTransitions().

Parameters:

  | caller | calling KTimeZone object

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

Implements KTimeZone.isDst().

Parameters:

  | caller | calling KTimeZone object

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

Implements KTimeZone.isDstAtUtc().

Parameters:

  | caller | calling KTimeZone object

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

Implements KTimeZone.offset().

Parameters:

  | caller | calling KTimeZone object

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

Implements KTimeZone.offsetAtUtc().

Parameters:

  | caller | calling KTimeZone object

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

Implements KTimeZone.offsetAtZoneTime().

Parameters:

  | caller | calling KTimeZone object

QByteArray type | ( |  | self ) |

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

Note:
  Every inherited class must reimplement type().

This base class returns "KTimeZone".

Returns:
  the class name