From 0018357c8b680025d3c0fa5509cbc2ed06dc8603 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 22 七月 2022 15:43:33 +0800
Subject: [PATCH] 5422 【Bug】【后端】转盘活动重置可能导致额外增加登录次数的bug

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
index e40aa0a..47a18b2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
@@ -1738,6 +1738,15 @@
 def ChangeStrToDatetime(timeStr, timeFormat=ChConfig.TYPE_Time_Format):
     return datetime.datetime.strptime(timeStr, timeFormat)
 
+## 时间格式转换成数值时间
+# @param dateT: datetime.datetime
+# @return: timeNum
+def ChangeDatetimeToNum(dateT): return int(time.mktime(dateT.timetuple()))
+
+def GetTodayTime():
+    ## 获取当天0点时间戳
+    return ChangeTimeStrToNum(str(GetCurrentTime())[:10], ChConfig.TYPE_Time_Format_Day)
+
 def CheckTimeIsSameServerDayEx(checkTime):
     '''判断指定time值与当天时间对比是否为游戏内的同一天;特殊时间点过天后才算不同天
     该函数一般用于判断某个功能记录的版本天是否与当天时间是同一天的逻辑

--
Gitblit v1.8.0