aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-11-01 18:14:33 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-11-01 18:14:33 +0000
commitd2e246dd295562acffa78919bd7a8d1599520677 (patch)
tree5d8fe18063a332732671ce5457b1dc50f15707f6 /os
parent8cbaf4d1ecea862b142b9e5125e79fa6767b92ce (diff)
downloadChibiOS-d2e246dd295562acffa78919bd7a8d1599520677.tar.gz
ChibiOS-d2e246dd295562acffa78919bd7a8d1599520677.tar.bz2
ChibiOS-d2e246dd295562acffa78919bd7a8d1599520677.zip
RTC. Fixed error in time conversion function
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7452 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/src/rtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/hal/src/rtc.c b/os/hal/src/rtc.c
index b6d212e64..68453e91b 100644
--- a/os/hal/src/rtc.c
+++ b/os/hal/src/rtc.c
@@ -212,7 +212,7 @@ void rtcConvertDateTimeToStructTm(const RTCDateTime *timespec,
tmp = timespec->millisecond / 1000;
timp->tm_sec = tmp % 60;
tmp -= timp->tm_sec;
- timp->tm_min = tmp % 3600;
+ timp->tm_min = (tmp % 3600) / 60;
tmp -= timp->tm_min * 60;
timp->tm_hour = tmp / 3600;
}