Tizen Native API  6.5
Dali::WatchTime Class Reference

The WatchTime class is used to get time for the WatchApplication. More...

Public Member Functions

 WatchTime ()
 Constructor.
 ~WatchTime ()
 Destructor.
int GetHour () const
 Returns the current hour.
int GetHour24 () const
 Returns the current hour24.
int GetMinute () const
 Returns the current minute.
int GetSecond () const
 Returns the current second.
int GetMillisecond () const
 Returns the current millisecond.
int GetYear () const
 Returns the current year.
int GetMonth () const
 Returns the current month.
int GetDay () const
 Returns the current day.
int GetDayOfWeek () const
 Returns the current day of week.
struct tm GetUtcTime () const
 Returns the UTC time. (Coordinated Universal Time)
time_t GetUtcTimeStamp () const
 Returns the UTC timestamp.
const char * GetTimeZone () const
 Returns the ID of timezone.
bool GetDaylightSavingTimeStatus () const
 Returns the daylight saving time status.

Detailed Description

The WatchTime class is used to get time for the WatchApplication.

A WatchTime has a time handle from watch application framework. You can get time(hour, minute, second, millisecond) and date(year, month, day) on receiving timeTick signal.

Since:
3.0, DALi version 1.1.37

Constructor & Destructor Documentation

Constructor.

Since:
3.0, DALi version 1.1.37

Destructor.

Since:
3.0, DALi version 1.1.37

Member Function Documentation

int Dali::WatchTime::GetDay ( ) const

Returns the current day.

Since:
3.0, DALi version 1.2.32
Returns:
The current day
Note:
The return value is always positive.
Precondition:
The WatchTime needs to be initialized.

Returns the daylight saving time status.

Since:
3.0, DALi version 1.2.32
Returns:
The Daylight Saving Time status
Precondition:
The WatchTime needs to be initialized.

Returns the current day of week.

The value returns from 1 (Sunday) to 7 (Saturday).

Since:
3.0, DALi version 1.2.32
Returns:
The current day of week
Note:
The return value is always positive.
Precondition:
The WatchTime needs to be initialized.
int Dali::WatchTime::GetHour ( ) const

Returns the current hour.

Since:
3.0, DALi version 1.1.37
Returns:
The current hour
Note:
The return value is always positive.
Precondition:
The WatchTime needs to be initialized.

Returns the current hour24.

Since:
3.0, DALi version 1.1.37
Returns:
The current hour(the 24-hour clock)
Note:
The return value is always positive.
Precondition:
The WatchTime needs to be initialized.

Returns the current millisecond.

Since:
3.0, DALi version 1.2.32
Returns:
The current millisecond
Note:
The return value is always positive.
Precondition:
The WatchTime needs to be initialized.

Returns the current minute.

Since:
3.0, DALi version 1.1.37
Returns:
The current minute
Note:
The return value is always positive.
Precondition:
The WatchTime needs to be initialized.

Returns the current month.

Since:
3.0, DALi version 1.2.32
Returns:
The current month
Note:
The return value is always positive.
Precondition:
The WatchTime needs to be initialized.

Returns the current second.

Since:
3.0, DALi version 1.1.37
Returns:
The current second
Note:
The return value is always positive.
Precondition:
The WatchTime needs to be initialized.
const char* Dali::WatchTime::GetTimeZone ( ) const

Returns the ID of timezone.

The timezone ID, according to the IANA(Internet Assigned Numbers Authority) If you want to see more information, please refer to the site : https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Since:
3.0, DALi version 1.2.32
Returns:
The ID of timezone
Precondition:
The WatchTime needs to be initialized.
struct tm Dali::WatchTime::GetUtcTime ( ) const [read]

Returns the UTC time. (Coordinated Universal Time)

Regarding struct tm (the return value), please refer to the site : http://www.cplusplus.com/reference/ctime/tm/

Since:
3.0, DALi version 1.2.32
Returns:
The UTC time
Precondition:
The WatchTime needs to be initialized.

Returns the UTC timestamp.

Since:
3.0, DALi version 1.2.32
Returns:
The UTC timestamp
Precondition:
The WatchTime needs to be initialized.
int Dali::WatchTime::GetYear ( ) const

Returns the current year.

Since:
3.0, DALi version 1.2.32
Returns:
The current year
Note:
The return value is always positive.
Precondition:
The WatchTime needs to be initialized.