homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

User independent flash clock
Independent from user OS time

5+ Year Member

Msg#: 3392785 posted 5:40 pm on Jul 12, 2007 (gmt 0)

I am trying to do a clock in flash that is independent from the user's operating system time.

I am passing it a unix timestamp as a parameter from the server and creating an instance of the Date object. The time zone of the user is not important since the clock would always show time in New York, or London, or Los Angeles, or ...

The problem is that if the user has got the time bad on his computer, maybe 15 mins ahead, then the flash clock will also be 15 mins off.

Any suggestions?




5+ Year Member

Msg#: 3392785 posted 2:08 pm on Jul 16, 2007 (gmt 0)

this is an easy one. In your actionScript you want to use the getUTCHours() instead of getHours(). This will return universal time and universal minutes, so it will operate independently from the users machine.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved