Click to See Complete Forum and Search --> : [RESOLVED] Making a Flash Clock With 2 Diffrent time zones.


Jabroni
01-18-2007, 12:59 PM
http://www.yozmausa.com/images/layout_10.gif
i wanna make those clocks work. i've been searching EVERYWHERE. so far all i got is clocks that are allready made with advertising on them and i did a tutorial in flash to make a clock but it's only to tell the time from the users computer. people are gonna be viewing the site in diffrent countries so the time has to be aligned with a time server or something. i might even pay the person to help me with this because this is for a client so i can ask him for extra money.

kredd
01-18-2007, 01:33 PM
grab the time on the server your hosting on and make the time calculations based on it...if your server is in central time just add an hour to get New Yorks time(Eastern), subtract 1 hour to get Mountain, etc.

very basic i know, but it's all i got!! :)

Jabroni
01-18-2007, 07:42 PM
do this tutorial: http://www.entheosweb.com/Flash/analog_clock.asp
then change the actionscript to this>
time=new Date(); // time object
seconds = time.getUTCSeconds()
minutes = time.getUTCMinutes()
hours = time.getUTCHours()

hours = hours +(minutes/60);
hours = hours +2;

seconds = seconds*6; // calculating seconds
minutes = minutes*6; // calculating minutes
hours = hours*30; // calculating hours

sec._rotation=seconds; // giving rotation property
min._rotation=minutes; // giving rotation property
hour._rotation=hours; // giving rotation property

hours = hours +2; <change that to what ever time zone (i.e. gmt -5 is eastern) check your gmt in windows by double clicking the time on your taskbar then selecting the time zone tab. it should show you your gmt in the drop down or you can find our diffrent gmts

Baracoda
09-07-2008, 06:25 AM
Hi all,

the .getUTC code is workable but still connect the clocks with PC clock, if you changed the time in your system, the clock changes.....is their anyway to get timing from servers or from hosting servers.?