Andrew Boyson / clock

Dependents:   oldheating gps motorhome heating

Committer:
andrewboyson
Date:
Sat Dec 01 19:13:29 2018 +0000
Revision:
37:330b844f54b6
Parent:
tm/tm.c@35:ba9f575aa3c6
Child:
38:25b2a3c494aa
Modified to remove dependence on time_t (32bit) and used an int64 instead.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 37:330b844f54b6 1 #include <stdint.h>
andrewboyson 26:0421132e6eaf 2 #include <time.h>
andrewboyson 26:0421132e6eaf 3
andrewboyson 37:330b844f54b6 4 #include "tm.h"
andrewboyson 37:330b844f54b6 5 #include "clktime.h"
andrewboyson 26:0421132e6eaf 6
andrewboyson 37:330b844f54b6 7 void TimeToTmLocal(int64_t time, struct tm* ptm) { TmLocalFromSeconds1970(time >> TIME_ONE_SECOND_SHIFT, ptm); }
andrewboyson 37:330b844f54b6 8 void TimeToTmUtc (int64_t time, struct tm* ptm) { TmUtcFromSeconds1970(time >> TIME_ONE_SECOND_SHIFT, ptm); }
andrewboyson 37:330b844f54b6 9 int64_t TimeFromTmUtc( struct tm* ptm) { return TmUtcToSeconds1970(ptm) << TIME_ONE_SECOND_SHIFT; }