fixed compiler error

David Rebbe 2024-12-12 13:07:09 -05:00
parent 1790fb038a
commit 0dc20db1ad
1 changed files with 1 additions and 3 deletions

View File

@ -234,10 +234,8 @@ icsneo_error_t get_and_print_rtc(icsneo_device_t* device, const char* descriptio
if (res != icsneo_error_success) {
return res;
}
struct tm buf;
char rtc_time[32] = {0};
localtime_s(&buf, &unix_epoch);
strftime(rtc_time, sizeof(rtc_time), "%Y-%m-%d %H:%M:%S", &buf);
strftime(rtc_time, sizeof(rtc_time), "%Y-%m-%d %H:%M:%S", localtime(&unix_epoch));
printf("RTC: %lld %s\n", unix_epoch, rtc_time);
return icsneo_error_success;