pandaomeng / gitalk-comment

使用gitalk存储博客的评论
0 stars 0 forks source link

python3 生成时间字符串 | Hexo #9

Open pandaomeng opened 5 years ago

pandaomeng commented 5 years ago

http://www.pandaomeng.com/2018/12-26-python3-time-string/

生成对应格式的时间字符串1234import timecurrent_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())print(current_time) 结果: 12018-12-26 14:27:26