Fix issue with midnight hour & 12hr formats.

No hour would be selected in the case of 12hr formats and a time like
00:xx:yy
Merge branch 'master' into 2.4