[tz] FW: may be a small mistake in the localtime.c code
Arthur David Olson
arthurdavidolson at gmail.com
Wed Jun 6 18:41:44 UTC 2012
For (so far unused in the real word) double leap seconds, the binary file
has different values for successive ls_trans/ls_corr pairs.
For example, if the current "leapseconds" is changed so that the upcoming
leapsecond is a double, a la...
Leap 2012 Jun 30 23:59:60 ++ S
...then there will be an an entry with an ls_trans value of 1341100824 and
an ls_corr value of 25
followed by an entry with an ls_trans value of 1341100825 and an ls_corr
value of 26.
Bottom line: Bradley White's code should be okay.
--ado
________________________________________
From: Z V [igt31415926 at gmail.com]
Sent: Thursday, May 24, 2012 6:02 AM
To: tz at iana.org
Subject: [tz] may be a small mistake in the localtime.c code
Hello,
The next piece of code looks like a mistake:
localtime.c (1477-1484)
while (i > 0 &&
sp->lsis[i].ls_trans ==
sp->lsis[i - 1].ls_trans + 1 &&
sp->lsis[i].ls_corr ==
sp->lsis[i - 1].ls_corr + 1) {
++hit;
--i;
}
As far as I understand here are processed 'Leap' rules with '++'
correction. If so, sp->lsis[i].ls_trans must be equal to sp->lsis[i -
1].ls_trans.
BR,
Igor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20120606/e2d08791/attachment.htm>
More information about the tz
mailing list