var clockTime = Sys.getClockTime();
var hour = clockTime.hour;
This returns a 24-hour hour despite if the simulator is in 24 hour mode AND 12 hour mode, i.e. always 13 for 1pm
Really? If so then just subtract 12 if is24Hour == true?
I suppose you mean:subtract 12 if is24Hour == false?
var hour = clockTime.hour % 12;
if(0 == hour){
hour = 12;
}