Method |
Description |
|
Abbreviation ( Qyoto.QDateTime utcDateTime ) : Qyoto.QByteArray |
Returns the time zone abbreviation current at a specified time. name="utcDateTime" UTC date/time. An error occurs if utcDateTime.timeSpec () is not Qt.UTC. |
|
Abbreviations ( ) : List |
Returns the list of time zone abbreviations used by the time zone. This may include historical ones which are no longer in use or have been superseded. |
|
Comment ( ) : string |
Returns any comment for the time zone. |
|
Convert ( KTimeZone newZone, Qyoto.QDateTime zoneDateTime ) : Qyoto.QDateTime |
Converts a date/time, which is interpreted as being local time in this time zone, into local time in another time zone. name="newZone" other time zone which the time is to be converted into name="zoneDateTime" local date/time. An error occurs if zoneDateTime.timeSpec () is not Qt.LocalTime. |
|
CountryCode ( ) : string |
Returns the two-letter country code of the time zone. |
|
CurrentOffset ( ) : int |
|
|
CurrentOffset ( Qt basis ) : int |
Returns the current offset of this time zone to UTC or the local system time zone. The offset is the number of seconds which you must add to UTC or the local system time to get local time in this time zone. Take care if you cache the results of this routine; that would break if the result were stored across a daylight savings change. name="basis" Qt.UTC to return the offset to UTC, Qt.LocalTime to return the offset to local system time |
|
Data ( ) : KTimeZoneData |
|
|
Data ( bool create ) : KTimeZoneData |
Returns the detailed parsed data for the time zone. This will return null unless either parse() has been called beforehand, or create is true. name="create" true to parse the zone's data first if not already parsed |
|
Dispose ( ) : void |
|
|
Equals ( object o ) : bool |
Checks whether this is the same instance as another one. Note that only the pointers to the time zone data are compared, not the contents. So it will only return equality if one instance was copied from the other. name="rhs" other instance |
|
FromTime_t ( int t ) : QDateTime |
Converts a UTC time, measured in seconds since 00:00:00 UTC 1st January 1970 (as returned by time(2)), to a UTC QDateTime value. QDateTime.SetTime_t() is limited to handling t >= 0, since its parameter is unsigned. This method takes a parameter of time_t which is signed. |
|
GetHashCode ( ) : int |
|
|
InvalidOffset ( ) : int |
|
|
InvalidTime_t ( ) : int |
|
|
IsValid ( ) : bool |
Checks whether the instance is valid. |
|
KTimeZone ( KTimeZone tz ) : System |
|
|
KTimeZone ( KTimeZoneBackend impl ) : System |
|
|
KTimeZone ( string name ) : System |
Constructs a UTC time zone. name="name" name of the UTC time zone |
|
Latitude ( ) : float |
Returns the latitude of the time zone. |
|
LeapSecondChanges ( ) : List |
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. |
|
Longitude ( ) : float |
Returns the latitude of the time zone. |
|
Name ( ) : string |
Returns the name of the time zone. If it is held in a KTimeZones container, the name is the time zone's unique identifier within that KTimeZones instance. |
|
Parse ( ) : bool |
Extracts time zone detail information for this time zone from the source database. |
|
Phases ( ) : List |
Return all daylight savings time phases for the time zone. 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. |
|
Source ( ) : KTimeZoneSource |
Returns the source reader/parser for the time zone's source database. |
|
ToTime_t ( QDateTime utcDateTime ) : int |
Converts a UTC QDateTime to a UTC time, measured in seconds since 00:00:00 UTC 1st January 1970 (as returned by time(2)). QDateTime.ToTime_t() returns an unsigned value. This method returns a time_t value, which is signed. name="utcDateTime" date/time. An error occurs if utcDateTime.timeSpec () is not Qt.UTC. |
|
ToUtc ( QDateTime zoneDateTime ) : QDateTime |
Converts a date/time, which is interpreted as local time in this time zone, into UTC. Because of daylight savings time shifts, the date/time may occur twice. In such cases, this method returns the UTC time for the first occurrence. If you need the UTC time of the second occurrence, use offsetAtZoneTime(). name="zoneDateTime" local date/time. An error occurs if zoneDateTime.timeSpec () is not Qt.LocalTime. |
|
ToZoneTime ( QDateTime utcDateTime ) : QDateTime |
|
|
ToZoneTime ( QDateTime utcDateTime, bool &secondOccurrence ) : QDateTime |
Converts a UTC date/time into local time in this time zone. Because of daylight savings time shifts, some local date/time values occur twice. The secondOccurrence parameter may be used to determine whether the time returned is the first or second occurrence of that time. name="utcDateTime" UTC date/time. An error occurs if utcDateTime.timeSpec () is not Qt.UTC. name="secondOccurrence" if non-null, returns true if the return value is the second occurrence of that time, else false |
|
TransitionIndex ( QDateTime dt ) : int |
|
|
TransitionIndex ( QDateTime dt, int &secondIndex ) : int |
|
|
TransitionIndex ( QDateTime dt, int &secondIndex, bool &validTime ) : int |
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. name="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. name="end" end UTC date/time, or invalid date/time for no end. end.timeSpec () must be Qt.UTC, else end will be considered invalid. 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. name="dt" date/time. dt.timeSpec () may be set to Qt.UTC or Qt.LocalTime. name="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. name="validTime" if non-null, is set to false if dt does not occur, or to true otherwise 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. name="dt" date/time. dt.timeSpec () may be set to Qt.UTC or Qt.LocalTime. name="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. name="validTime" if non-null, is set to false if dt does not occur, or to true otherwise |
|
TransitionTimes ( KTimeZone phase ) : List |
|
|
TransitionTimes ( KTimeZone phase, QDateTime start ) : List |
|
|
TransitionTimes ( KTimeZone phase, QDateTime start, QDateTime end ) : List |
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. name="phase" time zone phase name="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. name="end" end UTC date/time, or invalid date/time for no end. end.timeSpec () must be Qt.UTC, else end will be considered invalid. |
|
UNKNOWN ( ) : float |
|
|
UpdateBase ( KTimeZone other ) : bool |
Update the definition of the time zone to be identical to another KTimeZone instance. A prerequisite is that the two instances must have the same name. The main purpose of this method is to allow updates of the time zone definition by derived classes without invalidating pointers to the instance (particularly pointers held by KDateTime objects). Note that the KTimeZoneData object and KTimeZoneSource pointer are not updated: the caller class should do this itself by calling setData(). name="other" time zone whose definition is to be used |
|
Utc ( ) : KTimeZone |
Returns a standard UTC time zone, with name "UTC". @note The KTimeZone returned by this method does not belong to any KTimeZones collection. Any KTimeZones instance may contain its own UTC KTimeZone defined by its time zone source data, but that will be a different instance than this KTimeZone. |
|
UtcOffsets ( ) : List |
Returns the complete list of UTC offsets used by the time zone. This may include historical ones which are no longer in use or have been superseded. A UTC offset is the number of seconds which you must add to UTC to get local time in this time zone. If due to the nature of the source data for the time zone, compiling a complete list would require significant processing, an empty list is returned instead. |
|
operator ( ) : bool |
|
|
type ( ) : QByteArray |
Returns the class name of the data represented by this instance. If a derived class object has been assigned to this instance, this method will return the name of that class. |
|