Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GetServerTime

Last wiki revision 2022-08-01

Returns the server's Unix time. timestamp = GetServerTime

  • timestamp: - Time in seconds since the epoch.
  • The server's Unix timestamp is more preferable over since it's guaranteed to be synchronized between clients. The local machine's clock could possibly have been manually changed and might also be off by a few seconds if not recently synced.
  • Unix time is unrelated to your time zone, making it useful for tracking and sorting timestamps.

When in a EU time zone CEST (UTC+2) and playing on Moon Guard US, CDT (UTC-5). The examples were taken at the same time. Note that and are tied to your system's clock which can be manually changed. -- unix time -- 1596157547 ) -- 1596157549 -- local time, same as `date(nil, time)` -- "Fri Jul 31 03:05:47 2020" -- realm time -- 20, 4 -- hour:20, minute:4 -- 1596139440 unix time offset by the server's time zone (e.g. UTC minus 5 hours)

  • - local machine uptime.

Source

https://warcraft.wiki.gg/wiki/API_GetServerTime · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.