localtmn_from_sysclock.c (261B)
1 /* ISC license. */ 2 3 #include <time.h> 4 5 #include <skalibs/djbtime.h> 6 7 int localtmn_from_sysclock (localtmn *l, tain const *a, int tz) 8 { 9 struct tm t ; 10 if (!localtm_from_sysclock(&t, a->sec.x, tz)) return 0 ; 11 l->tm = t ; 12 l->nano = a->nano ; 13 return 1 ; 14 }