# Time BASED on server

**URL:** https://forum.kirupa.com/t/time-based-on-server/239037
**Category:** flash
**Created:** [September 18, 2007, 9:10am UTC](https://forum.kirupa.com/t/time-based-on-server/239037 "2007-09-18T09:10:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lovejeet](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@lovejeet](https://forum.kirupa.com/u/lovejeet)
#### Post date: [September 18, 2007, 9:10am UTC](https://forum.kirupa.com/t/time-based-on-server/239037/1 "2007-09-18T09:10:09Z")

</div>

Hey all,  
I have a clock that shows time according to local pc time but i want it to show according to the server. I have got the clock going according to server time but it is still the arms dosen’t seem to move in rotation…Can nyone tell me why?  
thanks in advance.

here’s the code.

onClipEvent (load) {  
this.loadVariables(“time.asp”);  
}

MyDate = new Date();  
curTime = 0;  
if (hours\>24) {  
hours = 0+(hours-24);  
} else if (hours\<0) {  
hours = 24+hours;  
}  
function showTime() {  
MyDate = new Date();  
[//MyDate.setTime](https://MyDate.setTime)(curTime);  
t = [];  
t[0] = MyDate.getHours();  
\_root.test1 = t[0];  
t[1] = MyDate.getMinutes();  
\_root.test2 = t[1];  
t[2] = MyDate.getSeconds();  
\_root.test3 = t[2];  
servertime.text = t.join(":");  
//this.hours\_mc.\_rotation = (MyDate.getHours())\*30;  
//this.minutes\_mc.\_rotation = (MyDate.getMinutes())\*6;  
//this.seconds\_mc.\_rotation = (MyDate.getSeconds())\*6;  
\_root.testmsg = “entertimer”;  
//angle = this.seconds\_mc.\_rotation;  
//this.seconds\_mc.\_rotation = angle+1;  
}  
//showTime();

//For Hands to show ryt time  
hours\_mc.\_rotation = (MyDate.getHours())\*30;  
minutes\_mc.\_rotation = (MyDate.getMinutes())\*6;  
seconds\_mc.\_rotation = (MyDate.getSeconds())\*6;

the codes works fine locally but when uploaded to server the hands of clock doesn’t move?  
plz reply…
