python获取当前时间的方法

#获取当前时间串 好用的方法

import datetime

def nowtime():
  return datetime.datetime.now().strftime('%Y%m%d%H%M%S')

posted @ 2020-08-17 19:54  测试艺术家  阅读(711)  评论(0编辑  收藏  举报