INT32 m2m_set_timeofday(struct M2M_T_RTC_TIMEVAL *tv, void *tz)
Description: the function sets the current time expressed as seconds and milliseconds since the epoch (1/1/1970), the time zone, and the Daylight Saving Time adjustment. Be careful, the setting will be successful only if the date is subsequent to 1/1/2000.
Parameters:
tv: pointer to the allocated data structure filled with seconds and milliseconds since 1/1/1970;
tz: pointer to the allocated M2M_T_RTC_TIMEZONE data structure filled with the time zone
expressed in quarter of hour (range: -47...+48), and the Daylight Saving Time adjustment (range: 0÷2); 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