-
Can anybody help me?
I am trying to build a clock into my website that only displays the time at the GMT timezone. I am using Flash MX. I have a movie clip with three dynamic text boxes, called: hour, min, and sec.
On the first frame of this Movie Clip, I have written this code:
/***Set Time***/
d = new Date();
hourtime = d.getUTCHours();
timezone = d.getTimezoneOffset();
timezoneoffset = -(timezone/60);
hour = hourtime + timezoneoffset();
min = d.getMinutes();
sec = d.getSeconds();
/*** Leading Zeroes Setup***/
if (length(min) == 1) {
min = "0" + min;
}
if (length(sec) == 1) {
sec = "0" + sec;
}
/****end****///
However, as here in the UK we are currrently in daytime saving mode, we are 1 hour ahead of GMT, hence the use of the timezoneoffset variable, I get the time displayed with this result, and it is GMT time, regardless of what timezone I set the pc clock to, however I can't get it to adjust for the 1 hour offset. I'd be greatly obliged to anyone who could help me with this.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|