Thanks guys! I understand the problem now, I mistakenly looked at the date reading in the inner and outer loops when you did in fact state it was a consequence of the clock advancing between the two checks on the same line. I'll edit as suggested by both of you, read the hour once and use it twice a...