[Opendnssec-user] Opendnssec signer Y2K bug?

Yuri Schaeffer yuri at nlnetlabs.nl
Fri Dec 23 14:36:51 UTC 2011


> I think this patch is correct. The confusion is that days represent
> 'days since' rather than 'day of year'

On second thought, I think the patch is not correct. Not only the day
will be off but also the year. My daughter does not give me opportunity
to think right now. But I suspect it is in the confusion I mentioned in
my previous post. Instead I propose:


+	++days;
while (days < 0 || days >= (int64_t) (is_leap_year(year) ? 366 : 365)) {
       new_year = year + (int) LDNS_DIV(days, 366);
       if (year == new_year) {
            year += days < 0 ? -1 : 1; 

//yuri




More information about the Opendnssec-user mailing list