Fixed calculation of the previous hour when no parameters are given, to enable this script to be easily called from cron