summaryrefslogtreecommitdiff
path: root/firmware/common/timefuncs.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-11-20 00:26:55 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-11-20 00:26:55 +0000
commit4dd6654bb244c259c3b188837817f3408e9208cc (patch)
tree36e8874d8eb825e2d60c183d56ae929884d93408 /firmware/common/timefuncs.c
parent6100dd099b870deb657372503aa8d0e673a315a6 (diff)
downloadrockbox-4dd6654bb244c259c3b188837817f3408e9208cc.tar.gz
rockbox-4dd6654bb244c259c3b188837817f3408e9208cc.zip
Only Recorders have RTC
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2864 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common/timefuncs.c')
-rw-r--r--firmware/common/timefuncs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c
index 0371762465..1abbdf12be 100644
--- a/firmware/common/timefuncs.c
+++ b/firmware/common/timefuncs.c
@@ -27,6 +27,7 @@ static struct tm tm;
27 27
28struct tm *get_time(void) 28struct tm *get_time(void)
29{ 29{
30#ifdef HAVE_RTC
30 char rtcbuf[8]; 31 char rtcbuf[8];
31 int i; 32 int i;
32 33
@@ -49,5 +50,16 @@ struct tm *get_time(void)
49 tm.tm_wday = rtcbuf[4] & 0x07; 50 tm.tm_wday = rtcbuf[4] & 0x07;
50 tm.tm_yday = 0; /* Not implemented for now */ 51 tm.tm_yday = 0; /* Not implemented for now */
51 tm.tm_isdst = -1; /* Not implemented for now */ 52 tm.tm_isdst = -1; /* Not implemented for now */
53#else
54 tm.tm_sec = 0;
55 tm.tm_min = 0;
56 tm.tm_hour = 0;
57 tm.tm_mday = 1;
58 tm.tm_mon = 1;
59 tm.tm_year = 1970;
60 tm.tm_wday = 1;
61 tm.tm_yday = 0; /* Not implemented for now */
62 tm.tm_isdst = -1; /* Not implemented for now */
63#endif
52 return &tm; 64 return &tm;
53} 65}