| | |
| | | # return serverID
|
| | | #return MainServerDict[serverID]
|
| | |
|
| | | ##获得当前服务器平台
|
| | | # @param 无
|
| | | # @return
|
| | | def GetPlatform():
|
| | | return ReadChConfig.GetPyMongoConfig("platform", "PlatformName")
|
| | |
|
| | | def GetAppID():
|
| | | ## 获取渠道ID
|
| | | return ReadChConfig.GetPyMongoConfig("platform", "AppID")
|
| | |
| | | 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
|