I'm creating a clock feature in flash for my company's intranet. The feature will have three clocks displaying the times in London, New York and Tokyo.
I have had one attempt at this so far. I use the current date to set the London time then add or subtract the required offset for New York and Tokyo. Roughly:
var date:Date = new Date();
hours = date.hours;
minutes = date.minutes;
seconds = date.seconds;
londonTime.text = hours + ":" + minutes + ":" + seconds;
nyTime.text = (hours - 5) + ":" + minutes + ":" + seconds;
tokyoTime.text = (hours+8) + ":" + minutes + ":" + seconds;
But if someone in the New York office was to look at this they would be presented with incorrect times because action script uses the time from the local machine.
How can I code to account for the various locales?
Many thanks in advance