# Help needed with time function

**URL:** <https://forum.kirupa.com/t/help-needed-with-time-function/149679>\
**Category:** Uncategorized\
**Created:** [May 31, 2005, 4:07pm UTC](https://forum.kirupa.com/t/help-needed-with-time-function/149679 "2005-05-31T16:07:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jest3r](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jest3r](https://forum.kirupa.com/u/jest3r)\
**Post date:** [May 31, 2005, 4:07pm UTC](https://forum.kirupa.com/t/help-needed-with-time-function/149679/1 "2005-05-31T16:07:58Z")

</div>

Hi, I’m trying to make a clock that shows different times for different countries. here is the code for the clock but how do I make it show the time x hours forward or back?

onClipEvent (enterFrame) {  
time = new Date();  
mil = time.getMilliseconds();  
s = time.getSeconds();  
m = time.getMinutes();  
h = time.getHours();  
seconds.\_rotation = s_6+(mil/(1000/6));  
minutes.\_rotation = m_6+(s/10);  
hours.\_rotation = h\*30+(m/2);  
}

cheers
