leap-seconds.list SHA1 checksum

For fun I wrote a simple program that computes the SHA1 checksum for leap-seconds.list.

It turns out there's quirky convention of writing out the 40-character SHA1 checksum in 5 groups of 8 hex characters - whith the special undocumented rule that leading zeros are suppressed. This means the SHA1 check fails for some files where we happen to have a leading zero in one of the 8-character groups - unless you happen to know about the undocumented rule...

The output looks like this. "New" is the checksum computed by the program, "Old" is the checksum contained in the published file.

https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list
read  117  lines
New:  1e2613791c4627c2d0a34c872ece0ae428dfb714
Old:  1e2613791c4627c2d0a34c872ece0ae428dfb714
Identical ?  True

ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.list
read  220  lines
New:  3f00425591f969f7252361e527aa6754eb6b7c72
Old:  3f00425591f969f7252361e527aa6754eb6b7c72
Identical ?  True

https://www.ietf.org/timezones/data/leap-seconds.list
read  250  lines
New:  5101445a69948b5109153e2b2086e3d8d54561a3
Old:  5101445a69948b519153e2b2086e3d8d54561a3
Identical ?  False

https://data.iana.org/time-zones/code/leap-seconds.list
read  250  lines
New:  5101445a69948b5109153e2b2086e3d8d54561a3
Old:  5101445a69948b519153e2b2086e3d8d54561a3
Identical ?  False

ftp://ftp.nist.gov/pub/time/leap-seconds.list
read  250  lines
New:  5101445a69948b5109153e2b2086e3d8d54561a3
Old:  5101445a69948b519153e2b2086e3d8d54561a3
Identical ?  False

There's also another simple script for authoring a leap-seconds.list file. It might be used for adding an artificial leap-second, generating a leap-seocnds.list file, and testing how different devices react to a leap-second - without having to wait for a real leap-second event.

In other news IERS recently announced there will be no leap-second in the summer of 2018.

See also time-stamp for leap-seconds.list.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.