I thought hour() is UTC. You could print the hour and lhour to the log for checking.