For a clock widget, displaying Eastern Standard Time:
onClipEvent (enterFrame) {
myTime2 = new Date();
nSeconds2 = myTime2.getSeconds();
nMinutes2 = myTime2.getMinutes();
nHours2 = myTime2.getUTCHours()-5;
if (nHours2<=0) {
nHours2 = 24+nHours2;
}
if (length(nMinutes2) == 1) {
nMinutes2 = "0"+nMinutes2;
}
nTime2 = nHours2+":"+nMinutes2;
}Works swell, except that 10 minutes after midnight displays as 24:10 - how would I get it to display 00:10 ?