This commit is contained in:
lixianjing 2020-08-24 10:17:49 +08:00
parent e90f5c4f4d
commit 958edfdb57

View File

@ -77,7 +77,9 @@ static ret_t date_time_set_now_impl(date_time_t* dt) {
if (SetLocalTime(&wtm)) {
return RET_OK;
} else {
log_debug("SetLocalTime failed\n");
uint32_t last_error = (uint32_t)GetLastError();
log_debug("SetLocalTime(%d-%d-%d %d:%d:%d) failed: %u\n", (int)wtm.wYear, (int)wtm.wMonth, (int)wtm.wDay,
(int)wtm.wHour, (int)wtm.wMinute, (int)wtm.wSecond, last_error);
return RET_FAIL;
}
}