From 0dc20db1adf05628a03e209a518532f78c346fe4 Mon Sep 17 00:00:00 2001 From: David Rebbe Date: Thu, 12 Dec 2024 13:07:09 -0500 Subject: [PATCH] fixed compiler error --- examples/c/simple/src/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/c/simple/src/main.c b/examples/c/simple/src/main.c index fc38a08..d708c92 100644 --- a/examples/c/simple/src/main.c +++ b/examples/c/simple/src/main.c @@ -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;