diff options
Diffstat (limited to 'firmware/common/timefuncs.c')
-rw-r--r-- | firmware/common/timefuncs.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c index e48aadd0a2..881bc23e53 100644 --- a/firmware/common/timefuncs.c +++ b/firmware/common/timefuncs.c | |||
@@ -49,6 +49,19 @@ struct tm *get_time(void) | |||
49 | #ifdef CONFIG_RTC | 49 | #ifdef CONFIG_RTC |
50 | static long timeout = 0; | 50 | static long timeout = 0; |
51 | 51 | ||
52 | #if CONFIG_RTC == RTC_DS1339_DS3231 | ||
53 | if(!rtc_detected) { | ||
54 | tm.tm_sec = 0; | ||
55 | tm.tm_min = 0; | ||
56 | tm.tm_hour = 0; | ||
57 | tm.tm_mday = 1; | ||
58 | tm.tm_mon = 0; | ||
59 | tm.tm_year = 70; | ||
60 | tm.tm_wday = 1; | ||
61 | tm.tm_yday = 0; /* Not implemented for now */ | ||
62 | tm.tm_isdst = -1; /* Not implemented for now */ | ||
63 | } else | ||
64 | #endif | ||
52 | /* Don't read the RTC more than once per second */ | 65 | /* Don't read the RTC more than once per second */ |
53 | if (current_tick > timeout) { | 66 | if (current_tick > timeout) { |
54 | char rtcbuf[7]; | 67 | char rtcbuf[7]; |