From 33c8e2a5941b4fe1825565e5f2c361b65e6a7420 Mon Sep 17 00:00:00 2001 From: Meco Jianting Man <920369182@qq.com> Date: Thu, 27 May 2021 01:18:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D4.0.3=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E9=87=8C=E4=B8=8D=E8=83=BD=E8=AE=BE=E7=BD=AE=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/RT-Thread-packages/netutils/issues/69 --- ntp/ntp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ntp/ntp.c b/ntp/ntp.c index 48174f2..fc502d2 100644 --- a/ntp/ntp.c +++ b/ntp/ntp.c @@ -377,6 +377,7 @@ time_t ntp_sync_to_rtc(const char *host_name) struct tm *cur_tm; cur_tm = localtime(&cur_time); set_time(cur_tm->tm_hour, cur_tm->tm_min, cur_tm->tm_sec); + cur_tm = localtime(&cur_time); set_date(cur_tm->tm_year + 1900, cur_tm->tm_mon + 1, cur_tm->tm_mday); #else rt_device_control(rt_device_find("rtc"), RT_DEVICE_CTRL_RTC_SET_TIME, &cur_time);