m2m_get_timeofday

INT32 m2m_get_timeofday(struct M2M_T_RTC_TIMEVAL *tv, void *tz)

 

Description: the function gets the current time expressed as seconds and milliseconds since the epoch (1/1/1970), the time zone and the Daylight Saving Time adjustment.

 

Parameters:
tv:      pointer to the allocated data structure;

tz:      pointer to the allocated M2M_T_RTC_TIMEZONE data structure; tz parameter is a pointer to

void for backward compatibility. It is up to the programmer to use M2M_T_RTC_TIMEZONE structure or NULL value. The function accepts both configurations.

 

Return value:
         on success:   0
         on failure:     -1

 

Output data:
         data structures filled with the current time since the epoch, the time zone, and the Daylight

Saving Time adjustment.

 

Examples: 19.1.9 Set Alarm