NAME
tai-download-leapseconds
-- download the IETF leapseconds file.
SYNOPSIS
tai-download-leapseconds http://my.server/foo/leaps.list http://other.server/leaps.list
tai-download-leapseconds --help
tai-download-leapseconds --quiet --pathname=/etc/leap-seconds.list
tai-download-leapseconds --show-url
DESCRIPTION
tai-download-leapseconds
iterates through a list of URLs and attempts to download the IETF leapseconds list file, saving it by default to a location where Time::TAI::Simple
knows to look for it.
By default it writes the pathname of the downloaded file to STDOUT upon success, or an error message to STDERR on failure.
If the user wishes to specify URLs where tai-download-leapseconds
should look first, any number of URLs may be specified as command line arguments, which will be checked in order.
These default behaviors may be controlled via some options:
-h Describe available options
--help Same as -h
--pathname=<pathname>
Specify the pathname to which the file is saved.
--show-url Write to STDOUT the URL from which the file was downloaded.
(Before pathname is written to STDOUT, on a different line.)
--quiet Do not write pathname to STDOUT or error messages to STDERR.
ABOUT URLS
At the time of this writing, tai-download-leapseconds
first tries to download the leapseconds list from the module author's own server, which under normal circumstances should fail (with an HTTP 404
reply code). When it is unable to retrieve the list from this location, it will attempt to download the list from the IETF's server at http://www.ietf.org/timezones/data/leap-seconds.list.
The reason for doing it this way is to allow workarounds should the IETF suffer infrastructure failure. If the IETF changes the location of their official list without setting up a redirect, or if their servers go down for an extended period of time, the module author can set up an HTTP 302
redirect to the new official leapsecond location, or provide a copy of the file directly.
Administrators who do not feel comfortable depending on some random guy's server should maintain their own redirect or leapsecond list file for their organization and pass the URL of this resource to tai-download-leapseconds
as an argument, or just maintain each server's /etc/leap-seconds.list
themselves and not use tai-download-leapseconds
at all.
SEE ALSO
AUTHOR
TTK Ciar, <ttk[at]ciar[dot]org>
COPYRIGHT AND LICENSE
Copyright 2014-2015 by TTK Ciar
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.