[Lua] Inconsistent server time / game time return values

 
Post new topic   Reply to topic    Freakz Forum Index -> WoW Freakz - Legion -> Bug Report -> Other
Author Message30
Goldpaw

[Mentally Stable]



Status: Offline
(online 5 days ago)
Joined: 20 Jun 2017
Posts: 18, Topics: 7
Location: Norway

Reputation: 40.6
Votes: 1

Post Posted: 16-04-2018, 15:49:16 | Translate post to: ... (Click for more languages)

Bug description:
There are 2 ways to retrieve the current server time (game time) through the Lua addon API in wow. The older local h, m = GetGameTime() and the more recent version added in WoD, local timeStamp = GetServerTime(). The problem is that the older version returns a time one hour ahead of the more recent version. So the question is, what is the actual server time?

The WoW addon code uses both calls, sometimes in the same parts of the UI (like the main menu bar). Inconsistent usage of them, sure, but that's just what we get when the UI has been changed and patched over so many years. The problem for us arises when the UI disagrees with itself on what time it is.

Proof:
Run the following commands in-game. They should return the same, but they don't:

Code:

   /run print(date("%H:%M", GetServerTime()))
   /run print(string.format("%02d:%02d", GetGameTime()))

0 0
  
Back to top
View user's profile Send private message
Kkthnxbye

[KkthnxUI Developer]



Status: Offline
(online 12 min ago)
Joined: 17 Nov 2011
Posts: 299, Topics: 153
Location: Attempt to index local 'Location' (a nil value)

Reputation: 99.4
Votes: 15

        Battletag: postrow.ID_BATTLE_NET}  KkthnxTV 
Post Posted: 16-04-2018, 18:09:36 | Translate post to: ... (Click for more languages)

Confirmed.

Success isn't what you've done compared to others. Success is what you've done compared to what you were made to do.

0 0
  
Back to top
View user's profile Send private message

  Topic locked


This forum section is closed, you cannot post any messages in it anymore


 
Post new topic   Reply to topic    Freakz Forum Index -> WoW Freakz - Legion -> Bug Report -> Other  


The time now is 22-04-2018, 17:21:32
Copyright info

Based on phpBB ro/com

 
 
 





I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x