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
This commit is contained in:
barthess 2014-11-01 18:14:33 +00:00
parent 8cbaf4d1ec
commit d2e246dd29
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ void rtcConvertDateTimeToStructTm(const RTCDateTime *timespec,
tmp = timespec->millisecond / 1000; tmp = timespec->millisecond / 1000;
timp->tm_sec = tmp % 60; timp->tm_sec = tmp % 60;
tmp -= timp->tm_sec; tmp -= timp->tm_sec;
timp->tm_min = tmp % 3600; timp->tm_min = (tmp % 3600) / 60;
tmp -= timp->tm_min * 60; tmp -= timp->tm_min * 60;
timp->tm_hour = tmp / 3600; timp->tm_hour = tmp / 3600;
} }