Commit e3259926 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

clarify: a simple comment "60" as a second value

style cleanup: C++-ize y++ vs ++y


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1091 e5f2f494-b856-4b98-b285-d166d9295462
parent 984f17ff
......@@ -99,7 +99,7 @@ DNSSECTimeFromText(const string& time_txt)
day, "day");
checkRange(0, 23, hour, "hour");
checkRange(0, 59, minute, "minute");
checkRange(0, 60, second, "second");
checkRange(0, 60, second, "second"); // 60 == leap second.
timeval = second + (60 * minute) + (3600 * hour) + ((day - 1) * 86400);
for (int m = 0; m < (month - 1); m++) {
......@@ -108,7 +108,7 @@ DNSSECTimeFromText(const string& time_txt)
if (isLeap(year) && month > 2) {
timeval += 86400;
}
for (int y = 1970; y < year; y++) {
for (int y = 1970; y < year; ++y) {
timeval += ((isLeap(y) ? 366 : 365 ) * 86400);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment