diff --git a/工具v2/database_tools.py b/工具v2/database_tools.py index b63df758..fff6efb5 100644 --- a/工具v2/database_tools.py +++ b/工具v2/database_tools.py @@ -6,6 +6,11 @@ def GetDate(): #获得当前日期 currentdate = str(time.localtime().tm_year)+str(time.localtime().tm_mon).zfill(2)+str(time.localtime().tm_mday).zfill(2) return currentdate #返回当前日期yyyymmdd +def GetTime(): #获得当前时间 + t = time.localtime() + currenttime = f"{t.tm_hour:0>2}{t.tm_min:0>2}{t.tm_sec:0>2}" + return currenttime #返回当前时间hhmmss + def ReadTextFile(filepath): #读取文本格式的文件 with open(filepath,"r",encoding="u8") as f: data = f.read()