]> git.gag.com Git - fw/sdcc/blob - device/examples/ds390/ow390/time.c
Let's adjust instead of a boldy decrement
[fw/sdcc] / device / examples / ds390 / ow390 / time.c
1 #include "time.h"
2
3 // let's just pretend it's 01 jan 1970 00.00:00 for now
4
5 time_t time(time_t *t) {
6   *t=0;
7   return *t;
8 }
9
10 struct tm lastTime;
11
12 struct tm *localtime(const time_t *timep) {
13   timep; // hush the compiler
14   lastTime.tm_sec=0;
15   lastTime.tm_min=0;
16   lastTime.tm_hour=0;
17   lastTime.tm_mday=1;
18   lastTime.tm_mon=0;
19   lastTime.tm_year=101;
20   lastTime.tm_wday=0;
21   lastTime.tm_yday=0;
22   lastTime.tm_isdst=0;
23   return &lastTime;
24 }