Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
Diff: targets/TARGET_NUVOTON/TARGET_NUC472/rtc_api.c
- Revision:
- 176:447f873cad2f
- Parent:
- 172:7d866c31b3c5
- Child:
- 184:08ed48f1de7f
diff -r af195413fb11 -r 447f873cad2f targets/TARGET_NUVOTON/TARGET_NUC472/rtc_api.c
--- a/targets/TARGET_NUVOTON/TARGET_NUC472/rtc_api.c Wed Oct 11 12:45:49 2017 +0100
+++ b/targets/TARGET_NUVOTON/TARGET_NUC472/rtc_api.c Wed Oct 25 14:53:38 2017 +0100
@@ -87,6 +87,9 @@
timeinfo.tm_mday = rtc_datetime.u32Day;
timeinfo.tm_wday = rtc_datetime.u32DayOfWeek;
timeinfo.tm_hour = rtc_datetime.u32Hour;
+ if (rtc_datetime.u32TimeScale == RTC_CLOCK_12 && rtc_datetime.u32AmPm == RTC_PM) {
+ timeinfo.tm_hour += 12;
+ }
timeinfo.tm_min = rtc_datetime.u32Minute;
timeinfo.tm_sec = rtc_datetime.u32Second;


