python格式化输出当前时间

python学习网 2020-07-08 15:59:02
import time

def get_now_time():
    now_time = time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))
    return now_time

 

阅读(2350) 评论(0)