tai-0: Support library to enable TAI usage on systems with time kept in UTC.

Safe HaskellNone
LanguageHaskell2010

Data.Time.Clock.TAI.LeapData

Synopsis

Documentation

type LeapSources = [LeapSource] Source #

LeapSources is a list of strings, specifying URIs the program can potentially access up-to-date leap-second.lists from. Each source begins with a protocol: For local sources "file://" followed by a path to the local file. For remote source sources "https://" prefixed URIs.

parseLeapSource :: String -> Maybe LeapSource Source #

Convert a string source to a LeapSource

mayRetrieveList :: LeapSource -> IO (Maybe LeapSecondList) Source #

Given a LeapSource, perform the actual aquasition and parsing

parseFileMaybe :: Day -> String -> Maybe LeapSecondList Source #

Parse a leap second list file, failing if it is expired.

leapSources :: LeapSources Source #

A few places we should be able to download up-to-date leap-seconds.list data.

sourceLeapData :: LeapSources -> IO LeapSecondList Source #

Aquire leap-seconds files and parse them, Trying the provided list of sources in order from local, to secure remote (HTTPS), until an up-to-date source is aquired or all options are exausted.

Currently only local and HTTPS has been implimented.