Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: SCHTIME.H
Link against: schsvr.lib

Class TTsTime

class TTsTime;

Description

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)

Members

Defined in TTsTime:
GetLocalTime(), GetLocalTime(), GetUtcTime(), GetUtcTime(), IsUtc(), SetLocalTime(), SetUtcTime(), TTsTime(), TTsTime(), TTsTime(), operator=()


Construction and destruction


TTsTime()

IMPORT_C TTsTime();

Description

Default constructor for TTsTime. This constructor initialises its member data to zero. By default this sets it to be UTC based.


TTsTime()

IMPORT_C TTsTime(const TTime &aTime, TBool aIsUtc);

Description

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

const TTime &aTime

The TTime value

TBool aIsUtc

is Etrue when aTime is UTC and EFalse when aTime is local time.


TTsTime()

IMPORT_C TTsTime(const TTsTime &aTTsTime);

Description

Copy constructor for TTsTime

Parameters

const TTsTime &aTTsTime

value to duplicate

[Top]


Member functions


SetLocalTime()

IMPORT_C void SetLocalTime(const TTime &aLocalTime);

Description

Sets this object to a local time based value updating its parameters as appropriate.

Parameters

const TTime &aLocalTime

The local time to be set.


GetLocalTime()

IMPORT_C const TTime GetLocalTime();

Description

This function returns a home time value.

Return value

const TTime

Retrieves time from object in local time


GetLocalTime()

IMPORT_C TTime GetLocalTime() const;

Description

This function returns a home time value.

Return value

TTime

Retrieves time from object in local time


SetUtcTime()

IMPORT_C void SetUtcTime(const TTime &aUtcTime);

Description

Sets this object to a UTC time based value updating its parameters as appropriate.

Parameters

const TTime &aUtcTime

The UTC time to be set


GetUtcTime()

IMPORT_C const TTime &GetUtcTime();

Description

This function returns a UTC value.

Return value

const TTime &

Returns the UTC time value.


GetUtcTime()

IMPORT_C const TTime &GetUtcTime() const;

Description

This function returns a UTC value.

Return value

const TTime &

Returns the UTC time value.


IsUtc()

IMPORT_C TBool IsUtc() const;

Description

Return value

TBool

ETrue, if TTsTime object is UTC and EFalse if TTsTime object is local time


operator=()

IMPORT_C TTsTime &operator=(const TTsTime &aTsTime);

Description

Overloaded assignment operator for TTsTime

Parameters

const TTsTime &aTsTime

time value to copy

Return value

TTsTime &