Fix a bug in time of the day