fixed issue with 00:00 / 24:00

When setting hour to zero or 24 the time was incorrect.  was setting hour to 23 when >=24 but should be zero. Now printing 25 controls with time from 0 to 24 gives correct results for all, in 24h mode, in 12h is still wrong: for 0 prints 01 AM (like for 1 and 24)