[LEAPSECS] DNS examples

Rob Seaman seaman at noao.edu
Wed Jan 21 18:40:25 EST 2015


I think it’s clear that DNS won’t support all leap second use cases, but that it may provide a high reliability / low latency method for some specific purposes.  Here is PHK’s specific example:

	$ dig +short leap.net-tid.dk a | ./leapdecode.py
	248.40.141.250 -> OK  2015  7  +35 +1

(dig might be useful for some script, but most usage will be more direct methods, of course)  Leapdecode.py is PHK’s crc8() and dec() functions with:

	for l in fileinput.input():
		print("%s -> %s" % (l.rstrip(), dec(l)))

With a wayward assert commented out this then does something useful with nonsense inputs:

	$ dig +short google.com a | ./leapdecode.py
	74.125.224.97 -> BAD 2027 12 +120 +0
	74.125.224.101 -> BAD 2027 12 +120 +0
	74.125.224.102 -> BAD 2027 12 +120 +0
	…

This is turning into a cottage industry and I doubt I’m alone in trying variations myself on this end:

	$ dig +short next.leapsec.com a | ./leapdecode.py
	248.40.141.250 -> OK  2015  7  +35 +1

and

	$ dig +short next.leapsec.com aaaa | sed -e 's/:\(.\):/:0\1:/' -e 's/::/T/' -e 's/:/-/' -e 's/:/-/' -e 's/$/Z/'
	2015-06-30T23:59:60Z

The quasi-readable IPv6 format we’ve been tossing around can be replaced with a more fully featured version of PHK’s Bulletin C, perhaps including DUT1, significantly expanded ranges of applicable dates and leap second tally, etc.

The next.leapsec.com <http://next.leapsec.com/> address could be coupled with prev.leapsec.com <http://prev.leapsec.com/> and other options.  Etc and so forth.

And as Steve points out, the tzdist discussions would support other use cases.

Rob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist6.pair.net/pipermail/leapsecs/attachments/20150121/3db1426b/attachment.html>


More information about the LEAPSECS mailing list