1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #3276 from haukepetersen/fix_vtimer_getlocaltime

sys/vtimer: initialize all values in get_localtime
This commit is contained in:
Hauke Petersen 2015-06-30 17:50:07 +02:00
commit a86f49a1e4

View File

@ -308,11 +308,10 @@ void vtimer_get_localtime(struct tm *localt)
timex_t now;
vtimer_now(&now);
memset(localt, 0, sizeof(struct tm));
localt->tm_sec = now.seconds % 60;
localt->tm_min = (now.seconds / 60) % 60;
localt->tm_hour = (now.seconds / 60 / 60) % 24;
// TODO: fill the other fields
}
void vtimer_init(void)