From 5dfc9bf567fdf69a0ee8899c4966ce64b4cfe5ad Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 12 三月 2026 12:07:54 +0800
Subject: [PATCH] 547 【红颜系统】新增红颜-服务端(新增激活方式8-定军阁层;新增红颜特殊效果5-遣散/吞噬额外返还;统一A801、0320物品获得标记;)

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

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
index 2ee6b3b..77755b5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
@@ -2024,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