TTsTime Class Reference

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)

Constructor & Destructor Documentation

TTsTime()

IMPORT_C TTsTime ( )

TTsTime(const TTime &, TBool)

IMPORT_C TTsTime ( const TTime & aTime,
TBool aIsUtc
)

Parameters

const TTime & aTime
TBool aIsUtc

TTsTime(const TTsTime &)

IMPORT_C TTsTime ( const TTsTime & aTTsTime )

Parameters

const TTsTime & aTTsTime

Member Functions Documentation

DetermineLocalTime()

TTime DetermineLocalTime ( ) const [private]

ExternalizeL(RWriteStream &)

void ExternalizeL ( RWriteStream & aStream ) const

Parameters

RWriteStream & aStream

GetLocalTime()

IMPORT_C const TTime GetLocalTime ( )

GetLocalTime()

IMPORT_C TTime GetLocalTime ( ) const

GetOffset()

TTimeIntervalSeconds GetOffset ( ) [inline]

GetUtcTime()

IMPORT_C const TTime & GetUtcTime ( )

GetUtcTime()

IMPORT_C const TTime & GetUtcTime ( ) const

InternalizeL(RReadStream &)

void InternalizeL ( RReadStream & aStream )

Parameters

RReadStream & aStream

IsUtc()

IMPORT_C TBool IsUtc ( ) const

ProcessOffsetEvent()

void ProcessOffsetEvent ( )

SetLocalTime(const TTime &)

IMPORT_C void SetLocalTime ( const TTime & aLocalTime )

Parameters

const TTime & aLocalTime

SetUtcTime(const TTime &)

IMPORT_C void SetUtcTime ( const TTime & aUtcTime )

Parameters

const TTime & aUtcTime

operator=(const TTsTime &)

IMPORT_C TTsTime & operator= ( const TTsTime & aTsTime )

Parameters

const TTsTime & aTsTime

Member Data Documentation

TUint32 iFlags

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

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

TTime iUtcTime [private]

This object always stores time as UTC irrespective of whether the object is home time or UTC based.