Hi,
I am trying to display the current times in 3 different places. On my own computer this works great, but i am not sure if this would work wherever you are, when i change my pc clock the times also change, should they not stay the same?
getTimes = setInterval(function () {
var myDate:Date = new Date();
var minute:String = myDate.getUTCMinutes().toString();;
while (minute.length<2) {
minute = "0"+minute;
}
var hour:Number = myDate.getUTCHours();
if (hour>12) {
hour -= 12;
ampm = "pm";
} else {
if (hour == 0) {
hour = 12;
}
ampm = "am";
}
moscowDub = hour+4;
gmt = hour+1;
sing = hour+8;
trace("SING "+sing+":"+minute+ampm);
trace("MOS "+moscowDub+":"+minute+ampm);
trace("GMT "+gmt+":"+minute+ampm);
}, 1000);