Formula

CommonFun.calcUserOfflineTime

function CommonFun.calcUserOfflineTime(logintime, offlinetime)
  if logintime < offlinetime + 1800 then
    return 0
  end
  local t = logintime - offlinetime
  if 43200 < t then
    t = 43200
  end
  return math.ceil(t / 60)
end