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

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

int tai_from_localtm (tai_t *t, struct tm const *l)
{
  uint64_t u ;
  if (!ltm64_from_localtm(&u, l)) return 0 ;
  return tai_from_ltm64(t, u) ;
}