时间bug修复

This commit is contained in:
xiekaidong 2023-04-27 16:16:10 +08:00
parent c9955a7816
commit a0e87d83ec
2 changed files with 1 additions and 3 deletions

View File

@ -21,9 +21,8 @@ function LoginManager:loginGame()
-- adjust 打开应用事件识别码
BIReport:postAdjustSimpleTrackEvent("xbszrl", {})
local serverTime = Time:getServerTime()
local serverTime = Time:getServerTime() * 1000
local todayBeginTime = serverTime - serverTime%86400
local now = os.date('!*t', serverTime)
Time:updateByServer(serverTime, todayBeginTime)
CS.BF.BFMain.IsGotServerTime = true

View File

@ -3,7 +3,6 @@ local ServerPlayerData = class("ServerPlayerData", ServerBaseData)
function ServerPlayerData:init(data)
self.data.loginDay = data and data.loginDay or 0
self.data.lastLoginTime = data and data.lastLoginTime or 0
Logger.logHighlight(Time:getServerTime())
if self.data.lastLoginTime < Time:getBeginningOfServerToday() then
self.data.lastLoginTime = Time:getBeginningOfServerToday()
self.data.loginDay = self.data.loginDay + 1