diff --git a/targets/TARGET_NUVOTON/TARGET_M2351/rtc_api.c b/targets/TARGET_NUVOTON/TARGET_M2351/rtc_api.c index aa6e038ef4..64aba00863 100644 --- a/targets/TARGET_NUVOTON/TARGET_M2351/rtc_api.c +++ b/targets/TARGET_NUVOTON/TARGET_M2351/rtc_api.c @@ -100,7 +100,7 @@ void rtc_write(time_t t) // Convert timestamp to struct tm struct tm timeinfo; - if (_rtc_localtime(t, &timeinfo) == false) { + if (_rtc_localtime(t, &timeinfo,RTC_4_YEAR_LEAP_YEAR_SUPPORT) == false) { return; }