📜  使用 strftime 在 python 中获取当前时间 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:14.383000             🧑  作者: Mango

代码示例1
now = datetime.datetime.now()
print ("Current date and time : ")
print (now.strftime("%Y-%m-%d %H:%M:%S"))