summaryrefslogtreecommitdiff
path: root/src/libstddjb/ltm64_from_tai.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/ltm64_from_tai.c')
-rw-r--r--src/libstddjb/ltm64_from_tai.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/libstddjb/ltm64_from_tai.c b/src/libstddjb/ltm64_from_tai.c
index c0650c5..9161a79 100644
--- a/src/libstddjb/ltm64_from_tai.c
+++ b/src/libstddjb/ltm64_from_tai.c
@@ -1,23 +1,16 @@
/* ISC license. */
-#include <skalibs/config.h>
#include <skalibs/uint64.h>
#include <skalibs/tai.h>
#include <skalibs/djbtime.h>
-
-#ifdef SKALIBS_FLAG_TZISRIGHT
+#include "djbtime-internal.h"
int ltm64_from_tai (uint64 *u, tai_t const *t)
{
- *u = t->x - 10U ;
- return 1 ;
+ switch (skalibs_tzisright())
+ {
+ case 1 : *u = t->x - 10U ; return 1 ;
+ case 0 : return utc_from_tai(u, t) ;
+ default : return 0 ;
+ }
}
-
-#else
-
-int ltm64_from_tai (uint64 *u, tai_t const *t)
-{
- return utc_from_tai(u, t) ;
-}
-
-#endif