summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/common/timefuncs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c
index cc54840376..6fdc0b7240 100644
--- a/firmware/common/timefuncs.c
+++ b/firmware/common/timefuncs.c
@@ -27,10 +27,11 @@
27#include "timefuncs.h" 27#include "timefuncs.h"
28#include "debug.h" 28#include "debug.h"
29 29
30#if !(defined SIMULATOR && CONFIG_RTC) 30#if !defined SIMULATOR || !CONFIG_RTC
31
32static struct tm tm; 31static struct tm tm;
32#endif /* !defined SIMULATOR || !CONFIG_RTC */
33 33
34#if !CONFIG_RTC
34static void fill_default_tm(struct tm *tm) 35static void fill_default_tm(struct tm *tm)
35{ 36{
36 tm->tm_sec = 0; 37 tm->tm_sec = 0;
@@ -43,7 +44,7 @@ static void fill_default_tm(struct tm *tm)
43 tm->tm_yday = 0; /* Not implemented for now */ 44 tm->tm_yday = 0; /* Not implemented for now */
44 tm->tm_isdst = -1; /* Not implemented for now */ 45 tm->tm_isdst = -1; /* Not implemented for now */
45} 46}
46#endif /* !(defined SIMULATOR && CONFIG_RTC)*/ 47#endif /* !CONFIG_RTC */
47 48
48bool valid_time(const struct tm *tm) 49bool valid_time(const struct tm *tm)
49{ 50{