Datetime fixes

Fixes problems with earlier commits that moved report towards using datetime objects internally instead of timestamp values.