27 Nov 2018 00:46:13 UTC
- Distribution: Time-TAI-Simple
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (522 / 0 / 3)
- KwaliteeBus factor: 1
- 67.14% Coverage
- License: perl_5
- Perl: v5.10.0
- Activity24 month
- Download (26.38KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionTTKCIAR Bill Moyer
tai-download-leapseconds-- download the IETF leapseconds file.
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
tai-download-leapsecondsiterates through a list of URLs and attempts to download the IETF leapseconds list file, saving it by default to a location where
Time::TAI::Simpleknows 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-leapsecondsshould 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.
At the time of this writing,
tai-download-leapsecondsfirst tries to download the leapseconds list from the module author's own server, which under normal circumstances should fail (with an HTTP
404reply 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 https://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
302redirect 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-leapsecondsas an argument, or just maintain each server's
/etc/leap-seconds.listthemselves and not use
TTK Ciar, <ttk[at]ciar[dot]org>
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.
Module Install Instructions
To install Time::TAI::Simple, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Time::TAI::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.