Division by zero in innreport
Julien ÉLIE
julien at trigofacile.com
Tue Jan 17 21:26:01 UTC 2012
Hi Petr,
> The line for "Mar 1 00:00:00 -- Feb 29 23:59:59" looks very suspicious.
> goblin2 and goblin3 were not active in 2007 so I can check only on goblin1.
At second glance, they were!
> I would suggest to remove the line for "Mar 1 00:00:00 -- Feb 29 23:59:59"
> in innreport.db to fix the problem.
> Maybe it has been generated by a previous version of innreport that had a bug;
> yet, it seems strange that it occurred in 2007 (a non-leap year)!!
Looking at up your reports, I see the following weird dates:
- goblin1 :
change of year 2007-2008 -> Jan 1 00:00:00 -- Dec 31 23:59:59
2007 -> Mar 1 00:00:00 -- Feb 29 23:59:59
change of year 2006-2007 -> Jan 1 00:00:00 -- Dec 31 23:59:59
- goblin2 :
change of year 2010-2011 -> Jan 1 00:00:00 -- Dec 31 23:59:59
change of year 2009-2010 -> Jan 1 00:00:00 -- Dec 31 23:59:59
change of year 2008-2009 -> Jan 1 00:00:00 -- Dec 31 23:59:59
change of year 2007-2008 -> Jan 1 00:00:00 -- Dec 31 23:59:59
change of year 2006-2007 -> Jan 1 00:00:00 -- Dec 31 23:59:59
2007 -> Mar 1 00:00:00 -- Feb 29 23:59:59
change of year 2006-2007 -> Jan 1 00:00:00 -- Dec 31 23:59:59
- goblin3 :
change of year 2010-2011 -> Jan 1 00:00:00 -- Dec 31 23:59:59
change of year 2009-2010 -> Jan 1 00:00:00 -- Dec 31 23:59:59
change of year 2008-2009 -> Jan 1 00:00:00 -- Dec 31 23:59:59
change of year 2007-2008 -> Jan 1 00:00:00 -- Dec 31 23:59:59
It looks like that INN was upgraded to a newer version in 2008 for
goblin1 and in 2011 for goblin2 & goblin3.
Do you confirm?
As for innreport for INN 2.5.3, what would be the best behaviour?
Maybe checking the validity of a date before using it and not process
the line if the date is not coherent? Should such lines be
automatically removed from innreport.db?
--
Julien ÉLIE
« C'est une forêt vierge où la main de l'homme n'a jamais mis le
pied. »
More information about the inn-workers
mailing list