Mailing List Archive

New leapsecs.dat for mess822.
Hello,

For those who might be using mess822 (or anything libtai), there is a
new update for leapsecs.dat that needs to be applied.

Andy
Re: New leapsecs.dat for mess822. [ In reply to ]
Andy Bradford <amb-sendok-1343603179.nfeloaabagojcdldoihh@bradfords.org> wrote:
>
> For those who might be using mess822 (or anything libtai), there is a
> new update for leapsecs.dat that needs to be applied.

djb's page at http://cr.yp.to/libtai.html says leapsecs.dat was last updated
on 2008-06-30. Where is the newer version with the recently-announced
leapsecond found?

Charles
--
--------------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at: http://pyropus.ca/software/
Read http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html
--------------------------------------------------------------------------
Re: New leapsecs.dat for mess822. [ In reply to ]
"Charles Cazabon" <search-web-for-address@pyropus.ca> wrote:
> Where is the newer version with the recently-announced leapsecond
> found?

You can build one from the leapseconds file in the latest tzdata using
this Perl script:

TZ=UTC0 perl -e '
use strict;
use POSIX qw(&mktime);
use integer;
my @mon=qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
my %months=map(($mon[$_] => $_), 0..$#mon);
my $line;
my $leaps=10;
$|=1;
while (defined($line=<STDIN>)) {
if ($line=~/^Leap\t(\d+)\t(\w+)\t(\d+)\t(\d+):(\d+):(\d+)\t\+\tS\n\z/) {
my $t=(mktime($6-1, $5, $4, $3, $months{$2}, $1-1900)+
1+$leaps++);
my @bytes=();
while ($t!=0) { unshift(@bytes, $t%256); $t/=256; }
while (@bytes<7) { unshift(@bytes, 0); }
unshift(@bytes, 64);
print(map(chr($_), @bytes)) or die($!);
}
}
' < leapseconds > leapsecs.dat


paul
Re: New leapsecs.dat for mess822. [ In reply to ]
Charles Cazabon <search-web-for-address@pyropus.ca> wrote:
> Where is the newer version with the recently-announced leapsecond found?

I didn't find anyone maintaining an updated copy, though I could have easily
missed it. Attached is the updated .txt which the .dat can be compiled from.

Charles

--
--------------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at: http://pyropus.ca/software/
Read http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html
--------------------------------------------------------------------------
Re: New leapsecs.dat for mess822. [ In reply to ]
Charles Cazabon wrote:
> Andy Bradford <amb-sendok-1343603179.nfeloaabagojcdldoihh@bradfords.org> wrote:
> >
> > For those who might be using mess822 (or anything libtai), there is a
> > new update for leapsecs.dat that needs to be applied.
>
> djb's page at http://cr.yp.to/libtai.html says leapsecs.dat was last updated
> on 2008-06-30. Where is the newer version with the recently-announced
> leapsecond found?

I don't believe it's been updated yet. I wrote a libtai-based leapsecs.dat
compiling utility a few years back:

<URL:http://su.bze.ro/software/leapsunpack-0.05.tar.gz>

It pulls the current compressed leapseconds table from leap.yp.to (which isn't
updated yet) or another DNS-based table of your choice, such as leap.bze.ro. You
can also forgo the DNS part and just manually update leapsecs.txt with a new
line "+2012-06-30" and compile leapsecs.dat from that.


Toby
Re: New leapsecs.dat for mess822. [ In reply to ]
Thus said "Charles Cazabon" on 30 Jun 2012 15:04:46 MDT:

> djb's page at http://cr.yp.to/libtai.html says leapsecs.dat was
> last updated on 2008-06-30. Where is the newer version with the
> recently-announced leapsecond found?

It looks like Dan hasn't yet updated that webpage. I'm not sure if he
still reads this mailing list, so I'll Cc him directly.

As far as updating is concerned, I usually just have a locally modified
copy of leapsecs.txt and then use the leapsecs binary from libtai to
regenerate:

./leapsecs < leapsecs.txt > leapsecs.dat

Andy