fixed code and test

testing for getting hourly, getting daily.

Not testing that the various sums and averages are properly doing
their job.  That is laziness on my part.