# class KTimeZoneData

###

Module | kdecore
Namespace |
Class | KTimeZoneData
Inherits |

### methods

- KTimeZoneData ( )

  returns ctor

- KTimeZoneData (c)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  c | KTimeZoneData |

- abbreviation (utcDateTime)

  returns QByteArray

  Argument | Type | Default
  --- | --- | ---
  utcDateTime | QDateTime |

  Returns the time zone abbreviation current at a specified time.

  utcDateTime - UTC date/time. An error occurs if utcDateTime.timeSpec() is not Qt.UTC. Returns time zone abbreviation, or empty string if error

  See also abbreviations()

- abbreviations ( )

  returns QList<QByteArray>

  Returns the complete list of time zone abbreviations. This may include translations.

  Returns the list of abbreviations. In this base class, it consists of the single string "UTC".

  See also abbreviation()

- clone ( )

  returns KTimeZoneData

  Creates a new copy of this object. The caller is responsible for deleting the copy. Derived classes must reimplement this method to return a copy of the calling instance.

  Returns copy of this instance

- hasTransitions ( )

  returns bool

  Return whether daylight saving transitions are available for the time zone.

  The base class returns false.

  Returns true if transitions are available, false if not

  See also transitions(), transition()

- leapSecondChange (utc)

  returns KTimeZone.LeapSeconds

  Argument | Type | Default
  --- | --- | ---
  utc | QDateTime |

  Find the leap second adjustment which is applicable at a given UTC time.

  utc - UTC date/time. An error occurs if utc.timeSpec() is not Qt.UTC. Returns leap second adjustment, or invalid if utc is earlier than the first leap second adjustment or utc is a local time

- leapSecondChanges ( )

  returns QList<KTimeZone::LeapSeconds>

  Return all leap second adjustments, in time order.

  Note that some time zone data sources (such as system time zones accessed via the system libraries) may not provide information on leap second adjustments. In such cases, this method will return an empty list.

  Returns list of adjustments

- phases ( )

  returns QList<KTimeZone::Phase>

  Return all daylight savings time phases.

  Note that some time zone data sources (such as system time zones accessed via the system libraries) may not allow a list of daylight savings time changes to be compiled easily. In such cases, this method will return an empty list.

  Returns list of phases

- previousUtcOffset ( )

  returns int

  Returns the UTC offset to use before the start of data for the time zone.

  Returns UTC offset

- setLeapSecondChanges (adjusts)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  adjusts | QList<KTimeZone::LeapSeconds> |

  Initialise the leap seconds adjustment list.

  adjusts - list of adjustments

  See also leapSecondChanges()

- setPhases (phases, previousUtcOffset)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  phases | QList<KTimeZone::Phase> |
  previousUtcOffset | int |

  Initialise the daylight savings time phase list.

  phases - list of phases

  previousUtcOffset - UTC offset to use before the start of the first phase

  See also phases()

- setTransitions (transitions)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  transitions | QList<KTimeZone::Transition> |

  Initialise the daylight savings time transition list.

  transitions - list of transitions

  See also transitions()

- transition (dt, secondTransition, validTime)

  returns KTimeZone.Transition
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  dt | QDateTime |
  secondTransition | KTimeZone.Transition | 0
  validTime | bool | 0

  Find the last daylight savings time transition at or before a given UTC or local time.

  Because of daylight savings time shifts, a local time may occur twice or may not occur at all. In the former case, the transitions at or before both occurrences of dt may optionally be calculated and returned in secondTransition. The latter case may optionally be detected by use of validTime.

  dt - date/time. dt.timeSpec() may be set to Qt.UTC or Qt.LocalTime.

  secondTransition - if non-null, and the dt occurs twice, receives the transition for the second occurrence. Otherwise, it is set the same as the return value.

  validTime - if non-null, is set to false if dt does not occur, or to true otherwise Returns time zone transition, or null either if dt is either outside the defined range of the transition data or if dt does not occur

  See also transitionIndex(), hasTransitions(), transitions()

- transitionIndex (dt)

  returns int, int (secondIndex), bool (validTime)

  Argument | Type | Default
  --- | --- | ---
  dt | QDateTime |

  Find the index to the last daylight savings time transition at or before a given UTC or local time. The return value is the index into the transition list returned by transitions().

  Because of daylight savings time shifts, a local time may occur twice or may not occur at all. In the former case, the transitions at or before both occurrences of dt may optionally be calculated and returned in secondIndex. The latter case may optionally be detected by use of validTime.

  dt - date/time. dt.timeSpec() may be set to Qt.UTC or Qt.LocalTime.

  secondIndex - if non-null, and the dt occurs twice, receives the index to the transition for the second occurrence. Otherwise, it is set the same as the return value.

  validTime - if non-null, is set to false if dt does not occur, or to true otherwise Returns index into the time zone transition list, or -1 either if dt is either outside the defined range of the transition data or if dt does not occur

  See also transition(), transitions(), hasTransitions()

- transitionTimes (phase, start, end)

  returns QList<QDateTime>

  Argument | Type | Default
  --- | --- | ---
  phase | KTimeZone.Phase |
  start | QDateTime | QDateTime()
  end | QDateTime | QDateTime()

  Return the times of all daylight saving transitions to a given time zone phase, in time order. If desired, the times returned may be restricted to a specified time range.

  Note that some time zone data sources (such as system time zones accessed via the system libraries) may not allow a list of daylight saving time changes to be compiled easily. In such cases, this method will return an empty list.

  phase - time zone phase

  start - start UTC date/time, or invalid date/time to return all transitions up to end. start.timeSpec() must be Qt.UTC, else start will be considered invalid.

  end - end UTC date/time, or invalid date/time for no end. end.timeSpec() must be Qt.UTC, else end will be considered invalid. Returns ordered list of transition times

  See also hasTransitions(), transition(), transitions()

- transitions (start, end)

  returns QList<KTimeZone::Transition>

  Argument | Type | Default
  --- | --- | ---
  start | QDateTime | QDateTime()
  end | QDateTime | QDateTime()

  Return all daylight saving transitions, in time order. If desired, the transitions returned may be restricted to a specified time range.

  Note that some time zone data sources (such as system time zones accessed via the system libraries) may not allow a list of daylight saving time changes to be compiled easily. In such cases, this method will return an empty list.

  start - start date/time, or invalid date/time to return all transitions up to end. start.timeSpec() must be Qt.UTC, else start will be considered invalid.

  end - end date/time, or invalid date/time for no end. end.timeSpec() must be Qt.UTC, else end will be considered invalid. Returns list of transitions, in time order

  See also hasTransitions(), transition(), transitionTimes()

- utcOffsets ( )

  returns QList<int>

  Returns the complete list of UTC offsets for the time zone, if the time zone's source makes such information readily available. If compiling a complete list would require significant processing, an empty list is returned instead.

  Returns sorted list of UTC offsets, or empty list if not readily available. In this base class, it consists of the single value 0.