(xpost) Server UTC time for events and functions
View Single Post
11-19-16, 11:51 AM
A Pyroguard Emberseer
Join Date: Sep 2007
It sounds like what you want is a function that returns a timestamp from a single time server, because different servers aren't necessarily going to be in sync.
You can actually produce a UTC timestamp from the server using
, assuming the timezone on the player's computer is set correctly.
Milliseconds can be calculated as accurately as possible using an OnUpdate script and tracking elapsed time since
In the interest of efficiency, once you've converted the server time to UTC it would be best to get the difference between that and
and use that to avoid having to repeatedly convert it using
because of the substantial overhead.
This method may or may not work for your project, but I figured I'd mention it here anyway.
View Public Profile
Send a private message to semlar
Find More Posts by semlar