1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/* ISC license. */ #include <sys/types.h> #include <time.h> #include <skalibs/uint64.h> #include <skalibs/djbtime.h> int utc_from_localtm (uint64 *uu, struct tm const *l) { uint64 u ; if (!ltm64_from_localtm(&u, l)) return 0 ; if (!utc_from_ltm64(&u)) return 0 ; *uu = u ; return 1 ; }