diff options
author | Boris Gjenero <dreamlayers@rockbox.org> | 2011-12-16 00:09:28 +0000 |
---|---|---|
committer | Boris Gjenero <dreamlayers@rockbox.org> | 2011-12-16 00:09:28 +0000 |
commit | ff1c5674172c4d0a5c420b8b20e7db0bd20f71ff (patch) | |
tree | 54b578a9390340df47be76b3efe0ecc5db66a148 /firmware/common/timefuncs.c | |
parent | 6a032a2db19930925626536d4e117d29527148c6 (diff) | |
download | rockbox-ff1c5674172c4d0a5c420b8b20e7db0bd20f71ff.tar.gz rockbox-ff1c5674172c4d0a5c420b8b20e7db0bd20f71ff.zip |
Remove USB time sync code when there's no RTC.
Without an RTC, Rockbox doesn't keep time. In that situation, USB time sync
previously did nothing but reported success. After this change, the USB time
sync request won't be recognized on those targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31319 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common/timefuncs.c')
-rw-r--r-- | firmware/common/timefuncs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c index af4b596dd0..cffdb3951a 100644 --- a/firmware/common/timefuncs.c +++ b/firmware/common/timefuncs.c | |||
@@ -105,6 +105,7 @@ int set_time(const struct tm *tm) | |||
105 | #endif /* RTC */ | 105 | #endif /* RTC */ |
106 | } | 106 | } |
107 | 107 | ||
108 | #if CONFIG_RTC | ||
108 | void set_day_of_week(struct tm *tm) | 109 | void set_day_of_week(struct tm *tm) |
109 | { | 110 | { |
110 | int y=tm->tm_year+1900; | 111 | int y=tm->tm_year+1900; |
@@ -115,4 +116,5 @@ void set_day_of_week(struct tm *tm) | |||
115 | if(m == 0 || m == 1) y--; | 116 | if(m == 0 || m == 1) y--; |
116 | tm->tm_wday = (d + mo[m] + y + y/4 - y/100 + y/400) % 7; | 117 | tm->tm_wday = (d + mo[m] + y + y/4 - y/100 + y/400) % 7; |
117 | } | 118 | } |
119 | #endif /* CONFIG_RTC */ | ||
118 | 120 | ||