# World time

**URL:** <https://forum.kirupa.com/t/world-time/226016>\
**Category:** Uncategorized\
**Created:** [May 17, 2007, 2:22pm UTC](https://forum.kirupa.com/t/world-time/226016 "2007-05-17T14:22:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![g5604](https://avatars.discourse-cdn.com/v4/letter/g/54ee81/32.png) [@g5604](https://forum.kirupa.com/u/g5604)\
**Post date:** [May 17, 2007, 2:22pm UTC](https://forum.kirupa.com/t/world-time/226016/1 "2007-05-17T14:22:48Z")

</div>

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?

```php
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);

```
