Our devices have Linux OS installed on them. When the box reboots, it will contact the servers, get the time from servers and this time will be set as local time on the device. Can any one please let me know if there is any way to check whether this time is valid or not.
(time_t)(-1) to indicate "the calendar time is not available."
mkitme() fails, it returns
(time_t)(-1) when "the calendar time cannot be represented".
Testing the result of
time() may be a sufficient "way to check whether this time is valid or not."
(time_t)(-1)is returned if the calendar time is not available. C11dr §220.127.116.11 3