import time def GetNowTime(): return time.strftime("%Y%m%d%H%M%S",time.localtime(time.time())) print(GetNowTime())