Flash scripting help (clock)

Associate
Joined
6 Jan 2006
Posts
1,024
Location
Midlands
Hi
ive made a clock in flash and it has the following code

Code:
onClipEvent ( enterFrame ) {
	var time = new Date();
	var hours = time.getHours();
	var minutes = time.getMinutes();
	var seconds = time.getSeconds();
	this.hour._rotation = this.hour_shadow._rotation = 30 * hours + minutes / 2;
	this.min._rotation = this.min_shadow._rotation = 6 * minutes;
	this.sec._rotation = this.sec_shadow._rotation = 6 * seconds;
}

I assume it will get the users time. My problem is i want to display the time in Japan. If i just do hours + 9 it will only work for users who live in GMT area.

How do i fix this?
 
write in something that checks the users date and time and their GMT setting, then create code that add however many hours are needed onto their GMT time to make it GMT+9

Dont ask me how though, just starting out in flash myself :D
 
Back
Top Bottom