From 2470d825e304e982261afd240d06ef03cd5366e8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 06 三月 2026 14:58:18 +0800
Subject: [PATCH] 16 卡牌服务端(后台禁言、封号支持;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
index 1262e72..77755b5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
@@ -1441,12 +1441,6 @@
# return serverID
#return MainServerDict[serverID]
-##获得当前服务器平台
-# @param 无
-# @return
-def GetPlatform():
- return ReadChConfig.GetPyMongoConfig("platform", "PlatformName")
-
def GetAppID():
## 获取渠道ID
return ReadChConfig.GetPyMongoConfig("platform", "AppID")
@@ -2030,7 +2024,11 @@
return datetime.datetime.strptime(timeStr, timeFormat)
def ChangeStrToDatetime(timeStr, timeFormat=ChConfig.TYPE_Time_Format):
- return datetime.datetime.strptime(timeStr, timeFormat)
+ try:
+ return datetime.datetime.strptime(timeStr, timeFormat)
+ except:
+ # 转化失败返回默认,如传入0也可转换
+ return datetime.datetime(1970, 1, 1, 8, 0, 0)
## 时间格式转换成数值时间
# @param dateT: datetime.datetime
--
Gitblit v1.8.0