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

#include <sys/types.h>
#include <time.h>
#include <skalibs/uint64.h>
#include <skalibs/tai.h>
#include <skalibs/djbtime.h>

int localtm_from_tai (struct tm *l, tai_t const *t, int tz)
{
  uint64 u ;
  if (!ltm64_from_tai(&u, t)) return 0 ;
  return localtm_from_ltm64(l, u, tz) ;
}