#include <schtime.h>
class TTsTime |
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 &) |
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)
IMPORT_C | TTsTime | ( | ) |
Default constructor for TTsTime. This constructor initialises its member data to zero. By default this sets it to be UTC based.
Constructs a TTsTime with a TTime. If the iIsUtc is ETrue, then TTsTime is UTC based time, if iIsUtc is EFalse then TTsTime is local time based. This constructor will update all the member data as appropriate.
Parameters | |
---|---|
aTime | The TTime value |
aIsUtc | is Etrue when aTime is UTC and EFalse when aTime is local time. |
void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Uses the standard template operator>>() to externalize the object to aStream
IMPORT_C const TTime | GetLocalTime | ( | ) |
This function returns a home time value.
IMPORT_C TTime | GetLocalTime | ( | ) | const |
This function returns a home time value.
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 const TTime & | GetUtcTime | ( | ) |
This function returns a UTC value.
IMPORT_C const TTime & | GetUtcTime | ( | ) | const |
This function returns a UTC value.
void | InternalizeL | ( | RReadStream & | aStream | ) |
Uses the standard template operator>>() to internalize the object from aStream. Additionally this method will ensure that the object is updated in the event that the system TimeZone/DST offset changed since it was externalised.
IMPORT_C TBool | IsUtc | ( | ) | const |
void | ProcessOffsetEvent | ( | ) |
This class does not explicitly update iOffSet if the system TimeZone/DST offset changes. When called this API will update the object if the system TimeZone/DST offset has changed. Keeping the offset in objects of this class correct is the responsibility of the Task Scheduler server.This applies to local time objects only. UTC objects will be unaffected.
IMPORT_C void | SetLocalTime | ( | const TTime & | aLocalTime | ) |
Sets this object to a local time based value updating its parameters as appropriate.
Parameters | |
---|---|
aLocalTime | The local time to be set. |
IMPORT_C void | SetUtcTime | ( | const TTime & | aUtcTime | ) |
Sets this object to a UTC time based value updating its parameters as appropriate.
Parameters | |
---|---|
aUtcTime | The UTC time to be set |