C# 클래스 Kimono.KTimeZone

상속: Object, IDisposable
파일 보기 프로젝트 열기: 0xd34df00d/Qross 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
interceptor SmokeInvocation

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
CreateProxy ( ) : void
KTimeZone ( Type dummy ) : System
SetData ( KTimeZoneData data ) : void
SetData ( KTimeZoneData data, KTimeZoneSource source ) : void Sets the detailed parsed data for the time zone, and optionally a new time zone source object. name="data" parsed data name="source" if non-null, the new source object for the time zone

비공개 메소드들

메소드 설명
HasTransitions ( ) : bool
IsDst ( int t ) : bool
IsDstAtUtc ( QDateTime utcDateTime ) : bool
KTimeZone ( ) : System
Offset ( int t ) : int
OffsetAtUtc ( QDateTime utcDateTime ) : int
OffsetAtZoneTime ( QDateTime zoneDateTime ) : int
OffsetAtZoneTime ( QDateTime zoneDateTime, int &secondOffset ) : int

메소드 상세

Abbreviation() 공개 메소드

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.
public Abbreviation ( Qyoto.QDateTime utcDateTime ) : Qyoto.QByteArray
utcDateTime Qyoto.QDateTime
리턴 Qyoto.QByteArray

Abbreviations() 공개 메소드

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.
public Abbreviations ( ) : List
리턴 List

Comment() 공개 메소드

Returns any comment for the time zone.
public Comment ( ) : string
리턴 string

Convert() 공개 메소드

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.
public Convert ( KTimeZone newZone, Qyoto.QDateTime zoneDateTime ) : Qyoto.QDateTime
newZone KTimeZone
zoneDateTime Qyoto.QDateTime
리턴 Qyoto.QDateTime

CountryCode() 공개 메소드

Returns the two-letter country code of the time zone.
public CountryCode ( ) : string
리턴 string

CreateProxy() 보호된 메소드

protected CreateProxy ( ) : void
리턴 void

CurrentOffset() 공개 메소드

public CurrentOffset ( ) : int
리턴 int

CurrentOffset() 공개 메소드

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
public CurrentOffset ( Qt basis ) : int
basis Qyoto.Qt
리턴 int

Data() 공개 메소드

public Data ( ) : KTimeZoneData
리턴 KTimeZoneData

Data() 공개 메소드

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
public Data ( bool create ) : KTimeZoneData
create bool
리턴 KTimeZoneData

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Equals() 공개 메소드

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
public Equals ( object o ) : bool
o object
리턴 bool

FromTime_t() 공개 정적인 메소드

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.
public static FromTime_t ( int t ) : QDateTime
t int
리턴 QDateTime

GetHashCode() 공개 메소드

public GetHashCode ( ) : int
리턴 int

InvalidOffset() 공개 정적인 메소드

public static InvalidOffset ( ) : int
리턴 int

InvalidTime_t() 공개 정적인 메소드

public static InvalidTime_t ( ) : int
리턴 int

IsValid() 공개 메소드

Checks whether the instance is valid.
public IsValid ( ) : bool
리턴 bool

KTimeZone() 공개 메소드

public KTimeZone ( KTimeZone tz ) : System
tz KTimeZone
리턴 System

KTimeZone() 공개 메소드

public KTimeZone ( KTimeZoneBackend impl ) : System
impl KTimeZoneBackend
리턴 System

KTimeZone() 보호된 메소드

protected KTimeZone ( Type dummy ) : System
dummy Type
리턴 System

KTimeZone() 공개 메소드

Constructs a UTC time zone. name="name" name of the UTC time zone
public KTimeZone ( string name ) : System
name string
리턴 System

Latitude() 공개 메소드

Returns the latitude of the time zone.
public Latitude ( ) : float
리턴 float

LeapSecondChanges() 공개 메소드

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.
public LeapSecondChanges ( ) : List
리턴 List

Longitude() 공개 메소드

Returns the latitude of the time zone.
public Longitude ( ) : float
리턴 float

Name() 공개 메소드

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.
public Name ( ) : string
리턴 string

Parse() 공개 메소드

Extracts time zone detail information for this time zone from the source database.
public Parse ( ) : bool
리턴 bool

Phases() 공개 메소드

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.
public Phases ( ) : List
리턴 List

SetData() 보호된 메소드

protected SetData ( KTimeZoneData data ) : void
data KTimeZoneData
리턴 void

SetData() 보호된 메소드

Sets the detailed parsed data for the time zone, and optionally a new time zone source object. name="data" parsed data name="source" if non-null, the new source object for the time zone
protected SetData ( KTimeZoneData data, KTimeZoneSource source ) : void
data KTimeZoneData
source KTimeZoneSource
리턴 void

Source() 공개 메소드

Returns the source reader/parser for the time zone's source database.
public Source ( ) : KTimeZoneSource
리턴 KTimeZoneSource

ToTime_t() 공개 정적인 메소드

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.
public static ToTime_t ( QDateTime utcDateTime ) : int
utcDateTime QDateTime
리턴 int

ToUtc() 공개 메소드

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.
public ToUtc ( QDateTime zoneDateTime ) : QDateTime
zoneDateTime QDateTime
리턴 QDateTime

ToZoneTime() 공개 메소드

public ToZoneTime ( QDateTime utcDateTime ) : QDateTime
utcDateTime QDateTime
리턴 QDateTime

ToZoneTime() 공개 메소드

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
public ToZoneTime ( QDateTime utcDateTime, bool &secondOccurrence ) : QDateTime
utcDateTime QDateTime
secondOccurrence bool
리턴 QDateTime

TransitionIndex() 공개 메소드

public TransitionIndex ( QDateTime dt ) : int
dt QDateTime
리턴 int

TransitionIndex() 공개 메소드

public TransitionIndex ( QDateTime dt, int &secondIndex ) : int
dt QDateTime
secondIndex int
리턴 int

TransitionIndex() 공개 메소드

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
public TransitionIndex ( QDateTime dt, int &secondIndex, bool &validTime ) : int
dt QDateTime
secondIndex int
validTime bool
리턴 int

TransitionTimes() 공개 메소드

public TransitionTimes ( KTimeZone phase ) : List
phase KTimeZone
리턴 List

TransitionTimes() 공개 메소드

public TransitionTimes ( KTimeZone phase, QDateTime start ) : List
phase KTimeZone
start QDateTime
리턴 List

TransitionTimes() 공개 메소드

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.
public TransitionTimes ( KTimeZone phase, QDateTime start, QDateTime end ) : List
phase KTimeZone
start QDateTime
end QDateTime
리턴 List

UNKNOWN() 공개 정적인 메소드

public static UNKNOWN ( ) : float
리턴 float

UpdateBase() 공개 메소드

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
public UpdateBase ( KTimeZone other ) : bool
other KTimeZone
리턴 bool

Utc() 공개 정적인 메소드

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.
public static Utc ( ) : KTimeZone
리턴 KTimeZone

UtcOffsets() 공개 메소드

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.
public UtcOffsets ( ) : List
리턴 List

operator() 공개 정적인 메소드

public static operator ( ) : bool
리턴 bool

type() 공개 메소드

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.
public type ( ) : QByteArray
리턴 QByteArray

프로퍼티 상세

interceptor 보호되어 있는 프로퍼티

protected SmokeInvocation interceptor
리턴 SmokeInvocation