class TTsTime |
In Task Scheduler TTsTime is used to represent time as either UTC or Local Time. It is used by many of the Task Scheduler API's and also used internally within Task Scheduler. This class is not expected to be stored by Task Scheduler clients.
It provides EXPORTed APIs for constructing, setting and getting UTC and Local Time.
Internally the object always holds time as UTC (using the data member iUTC) irrespective of whether the object is local time based or UTC based.
If the object is local time based iOffset will be set to the system TimeZone/DST offset. When UTC based iOffset will always be 0.
Therefore:
When representing UTC: iUTC contains the UTC time iOffSet is set to 0 iFlags, bit 0 is set to 1
When representing Local Time: iUTC contains the home time minus the TimeZone/DST offset iOffSet contains the TimeZone/DST offset iFlags, bit 0 is set to 0
If an instance of this class is created using the default constructor then: iUTC is set to 0 iOffSet is set to 0 iFlags, bit 0 is set to 1 (indicating UTC time)
Public Member Functions | |
---|---|
TTsTime() | |
TTsTime(const TTime &, TBool) | |
TTsTime(const TTsTime &) | |
void | ExternalizeL(RWriteStream &) |
IMPORT_C const TTime | GetLocalTime() |
IMPORT_C TTime | GetLocalTime() |
TTimeIntervalSeconds | GetOffset() |
IMPORT_C const TTime & | GetUtcTime() |
IMPORT_C const TTime & | GetUtcTime() |
void | InternalizeL(RReadStream &) |
IMPORT_C TBool | IsUtc() |
void | ProcessOffsetEvent() |
IMPORT_C void | SetLocalTime(const TTime &) |
IMPORT_C void | SetUtcTime(const TTime &) |
IMPORT_C TTsTime & | operator=(const TTsTime &) |
Private Member Functions | |
---|---|
TTime | DetermineLocalTime() |
Private Attributes | |
---|---|
TUint32 | iFlags |
TTimeIntervalSeconds | iOffset |
TTime | iUtcTime |
IMPORT_C | TTsTime | ( | const TTsTime & | aTTsTime | ) |
const TTsTime & aTTsTime |
void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
RWriteStream & aStream |
TTimeIntervalSeconds | GetOffset | ( | ) | [inline] |
This method must only be used by Task Scheduler itself as it returns raw offset data that can become out of date if system Timezone/DST changes occur.
IMPORT_C void | SetLocalTime | ( | const TTime & | aLocalTime | ) |
const TTime & aLocalTime |
IMPORT_C void | SetUtcTime | ( | const TTime & | aUtcTime | ) |
const TTime & aUtcTime |
IMPORT_C TTsTime & | operator= | ( | const TTsTime & | aTsTime | ) |
const TTsTime & aTsTime |
TUint32 | iFlags | [private] |
Bit 0 is set to 0 when UTC based, Bit 0 is set to 1 when home time based, Bit1-Bit31 are reserved for future use.
TTimeIntervalSeconds | iOffset | [private] |
If the object is UTC based then this will always be 0. If home time based then this will contain the value of system TimeZone/DST offset at the time that the object was created or last updated.
TTime | iUtcTime | [private] |
This object always stores time as UTC irrespective of whether the object is home time or UTC based.