Fixed bug in setTimeOfDay method.