So it's not possible to get server side seconds-since-epoch?
I'm adding features to a mod that requires an authoritative time/date stamp, so that users can report the last known time a given player was chosen as a target.
It seems that the only seconds-since-epoch functions are client-side and that there's no notion of "date" with any of the server side time functions. This leaves me with two options: 1) Use GetTime() and just live with the fact that the "LastSeen" field will be garbage each time there is a server restart. (GetTime() returns server uptime, not SSE). 2) Use the time() function, try to figure out a way of determining what time zone the client is, and hope that their clock is accurate. I'm thinking option 1 is by far the lesser of two evils. |
Implemented an initialization check...
Since there's a server restart in the morning I'll be able to test this.
In my addon init function I implemented this: Code:
-- Has there been a server reboot? Seconds since epoch on the server would sure be nice right about now!! |
why don't you just use addon messages to create a list of offsets for each client? factor in the current lag if you have to.
|
addon messages
Quote:
If by addon message you mean using SendAddonMessage(), that won't work because you have to be in party, raid, guild or battleground. Sorry for my stupidity....I don't understand the idea you're getting at with the list of offsets... Thanks for the reply tho :) |
Well I was *obviously* thinking that "last known time a given player was chosen as a target" would only be of relevance to a party, raid or battleground group
^^ I see now, you're looking to save a history for the user? Why not use their local time then? |
All times are GMT -6. The time now is 04:45 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI