homepage Welcome to WebmasterWorld Guest from 54.242.200.172
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
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
jonte




msg:3392787
 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?

Jon

 

btraindesign




msg:3395798
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved