From 449dff44ce38f128d6cff580e0ac8848ba70a9f9 Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Thu, 12 Apr 2012 21:32:25 +0200 Subject: [PATCH] Calculate day-of-week after reading time from RTC. Should fix FS#11814 Change-Id: I31dc0b0db5272d16ae55790252e3963e1a91d5bb --- firmware/common/timefuncs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c index cffdb3951a..ffa6e2a0b3 100644 --- a/firmware/common/timefuncs.c +++ b/firmware/common/timefuncs.c @@ -71,6 +71,7 @@ struct tm *get_time(void) /* Once per second, 1/10th of a second off */ timeout = HZ * (current_tick / HZ + 1) + HZ / 5; rtc_read_datetime(&tm); + set_day_of_week(&tm); tm.tm_yday = 0; /* Not implemented for now */ tm.tm_isdst = -1; /* Not implemented for now */