summaryrefslogtreecommitdiff
path: root/src/libstddjb/leapsecs_table.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-10-14 22:54:08 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-10-14 22:54:08 +0000
commit805729e206b7586c57483aa0f4a90f7e0e2c9661 (patch)
tree4d4afb75b73cd11c953853faa48dc4cc7f236380 /src/libstddjb/leapsecs_table.c
parent2e0421fc58922697f2bb51c428599fbd44055556 (diff)
downloadskalibs-805729e206b7586c57483aa0f4a90f7e0e2c9661.tar.xz
- Remove /etc/leapsecs.datv2.3.8.0
- Publish tools to create the leap second table as a .c - Simplify functions using leap seconds - rc for 2.3.8.0
Diffstat (limited to 'src/libstddjb/leapsecs_table.c')
-rw-r--r--src/libstddjb/leapsecs_table.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/libstddjb/leapsecs_table.c b/src/libstddjb/leapsecs_table.c
new file mode 100644
index 0000000..d5a32a9
--- /dev/null
+++ b/src/libstddjb/leapsecs_table.c
@@ -0,0 +1,39 @@
+/* ISC license. */
+
+/* MT-unsafe */
+
+#include <skalibs/uint64.h>
+#include <skalibs/tai.h>
+#include "djbtime-internal.h"
+
+unsigned int const leapsecs_table_len = 26 ;
+static uint64 const leapsecs_table_[26] =
+{
+ TAI_MAGIC + 78796809,
+ TAI_MAGIC + 94694410,
+ TAI_MAGIC + 126230411,
+ TAI_MAGIC + 157766412,
+ TAI_MAGIC + 189302413,
+ TAI_MAGIC + 220924814,
+ TAI_MAGIC + 252460815,
+ TAI_MAGIC + 283996816,
+ TAI_MAGIC + 315532817,
+ TAI_MAGIC + 362793618,
+ TAI_MAGIC + 394329619,
+ TAI_MAGIC + 425865620,
+ TAI_MAGIC + 489024021,
+ TAI_MAGIC + 567993622,
+ TAI_MAGIC + 631152023,
+ TAI_MAGIC + 662688024,
+ TAI_MAGIC + 709948825,
+ TAI_MAGIC + 741484826,
+ TAI_MAGIC + 773020827,
+ TAI_MAGIC + 820454428,
+ TAI_MAGIC + 867715229,
+ TAI_MAGIC + 915148830,
+ TAI_MAGIC + 1136073631,
+ TAI_MAGIC + 1230768032,
+ TAI_MAGIC + 1341100833,
+ TAI_MAGIC + 1435708834
+} ;
+uint64 const *const leapsecs_table = leapsecs_table_ ;