time-selector: format hour according to the 12/24h setting