summaryrefslogtreecommitdiff
path: root/src/libstddjb/localtmn_from_tain.c
blob: 98608952ee4bdad927f8541dafd0e27ef519d209 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* ISC license. */

#include <time.h>
#include <skalibs/djbtime.h>

int localtmn_from_tain (localtmn *l, tain const *a, int tz)
{
  struct tm t ;
  if (!localtm_from_tai(&t, tain_secp(a), tz)) return 0 ;
  l->tm = t ;
  l->nano = a->nano ;
  return 1 ;
}