[−][src]Function avr_libc::set_system_time
pub unsafe extern "C" fn set_system_time(timestamp: time_t)
Initialize the system time. Examples are...
From a Clock / Calendar type RTC: \code struct tm rtc_time;
read_rtc(&rtc_time); rtc_time.tm_isdst = 0; set_system_time( mktime(&rtc_time) ); \endcode
From a Network Time Protocol time stamp: \code set_system_time(ntp_timestamp - NTP_OFFSET); \endcode
From a UNIX time stamp: \code set_system_time(unix_timestamp - UNIX_OFFSET); \endcode