Thread Tools Display Modes
08-13-05, 09:32 AM   #1
Thamas
A Kobold Labourer
Join Date: Aug 2005
Posts: 1
Getting server time?

Hello everyone,

for an addon i'm trying to make, i would like to be able to put a timestamp on data I collect. The value of the timestamp itself is not really important, just that they have appropriate ordering: i want to be able to determine which is newer.
I used time() for this, but it turns out that this gives the time according to the user's computer clock, not an (approximately) synchronized world clock. The whole point of the addon revolves around being able to know which data from different users is the newest, so I can't use time().
I can't use GetGameTime(), because it only gives the time, not the date.

Which leaves GetTime(), but all information I have found on it is unclear and ``relatively unconfirmed.'' It returns seconds since what? Does it reset every content patch? Every minor patch? Every server restart?

Does anyone have more specific information on GetTime()? Or know a better way to get (approximately) globally valid timestamps?

Thanks in advance,
Thomas van Dijk
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Getting server time?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off