package orsetto

  1. Overview
  2. Docs
A library of assorted structured data interchange languages

Install

Dune Dependency

Authors

Maintainers

Sources

r1.1.tar.gz
sha256=6e6f59fc6a2c590b1b377e40f2120a548e6f09e61e7eb12ffa45cf2d517316b8
md5=533153cd4a9fe8093d3b98afc1073bc8

doc/orsetto.cf/Cf_leap_second/index.html

Module Cf_leap_second

Handling the leap second archive

Overview

This module defines a data structure representing the history of leap seconds published in Bulletin C by the International Earth Rotation and Reference Systems Service (IERS). This data is used in converting between the Coordinated Universal Time (UTC) and Temps Atomique International (TAI) timescales. Bulletin C is published every six months and whenever necessary and a machine readable archive of the historical record is provided as a public service by the United States National Institute of Standards and Technology (NIST) and the Internet Engineering Task Force (IETF) at the following locations:

<https://www.ietf.org/timezones/data/leap-seconds.list> <ftp://ftp.nist.gov/pub/time/leap-seconds.list>

The data intrinsically inclued in the current implementation expires on December 28, 2021. Use the load_from_nist_file function to use a more recent update of the leap second archive.

Types
type entry = private
  1. | Entry of {
    1. epoch : Cf_tai64.t;
    2. offset : int;
    }

An entry in the archive comprising the TAI epoch of an announced leap second and the new offset from UTC to TAI in seconds after the leap.

type archive = private
  1. | Archive of {
    1. current : int;
    2. updated : Cf_tai64.t;
    3. expires : Cf_tai64.t;
    4. history : entry list;
    }

A record of known leap seconds in reverse chronological order.

Values
val current : unit -> archive

Use current () to obtain the current leap second archive.

val load_from_nist_file : string -> unit

Use load_from_nist_file filename to override the internal archive data with the content of filename, a file copied from the data published by NIST and IETF. Raise an exception if the file cannot be read or a parsing error arises.

OCaml

Innovation. Community. Security.