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

#include <skalibs/uint64.h>
#include <skalibs/tai.h>
#include <skalibs/djbtime.h>
#include "djbtime-internal.h"

int ltm64_from_tai (uint64 *u, tai_t const *t)
{
  switch (skalibs_tzisright())
  {
    case 1 : *u = t->x - 10U ; return 1 ;
    case 0 : return utc_from_tai(u, t) ;
    default : return 0 ;
  }
}