skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

localtm_from_sysclock.c (246B)


      1 /* ISC license. */
      2 
      3 #include <time.h>
      4 #include <skalibs/uint64.h>
      5 #include <skalibs/djbtime.h>
      6 
      7 int localtm_from_sysclock (struct tm *l, uint64_t u, int tz)
      8 {
      9   if (!ltm64_from_sysclock(&u)) return 0 ;
     10   return localtm_from_ltm64(l, u, !!tz) ;
     11 }