skalibs

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

localtmn_from_tain.c (255B)


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