Welcome to WebmasterWorld Guest from 54.226.2.31

Forum Moderators: open

Message Too Old, No Replies

User independent flash clock

Independent from user OS time

     

jonte

5:40 pm on Jul 12, 2007 (gmt 0)

10+ Year Member



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

2:08 pm on Jul 16, 2007 (gmt 0)

5+ Year Member



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.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month