提交 b04bc1ae 编写于 作者: W wenzhouwww@live.cn

test:update metchod about get current datetime

上级 65d4b024
...@@ -1120,7 +1120,7 @@ class Database: ...@@ -1120,7 +1120,7 @@ class Database:
@classmethod @classmethod
def setupLastTick(cls): def setupLastTick(cls):
# start time will be auto generated , start at 10 years ago local time # start time will be auto generated , start at 10 years ago local time
local_time = datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')[:-16] local_time = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')[:-16]
local_epoch_time = [int(i) for i in local_time.split("-")] local_epoch_time = [int(i) for i in local_time.split("-")]
#local_epoch_time will be such as : [2022, 7, 18] #local_epoch_time will be such as : [2022, 7, 18]
......
...@@ -46,7 +46,7 @@ class Logging: ...@@ -46,7 +46,7 @@ class Logging:
@classmethod @classmethod
def _get_datetime(cls): def _get_datetime(cls):
return datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')[:-1] return datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')[:-1]
@classmethod @classmethod
def getLogger(cls): def getLogger(cls):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册