C_DateAndTime.GetServerTimeLocal

From Wowpedia
Jump to: navigation, search

Returns the server's Unix time offset by the server's UTC timezone.

serverTimeLocal = C_DateAndTime.GetServerTimeLocal()

Returns

serverTimeLocal 
number - Time in seconds since the epoch, only updates every 60 seconds.

Comparison

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.

-- unix time
time()                             -- 1596157547
GetServerTime())                   -- 1596157549
C_DateAndTime.GetServerTimeLocal() -- 1596139440 unix time offset by UTC (e.g. minus 5 hours)
-- local time
date()                             --  "Fri Jul 31 03:05:47 2020"
-- realm time
GetGameTime()                          -- 20, 4
C_DateAndTime.GetCurrentCalendarTime() -- hour:20, minute:4

Patch changes

External links