Hexo

  • Home
  • Archives
  • Categories
  • Tags
  • About
  • Search

  • Table of Contents
  • Overview
  1. 1. 生成对应格式的时间字符串

Patrick Pan

62 posts
42 tags

python3 生成时间字符串

Posted on 2018-12-26 Edited on 2024-05-21

生成对应格式的时间字符串

1
2
3
4
import time

current_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
print(current_time)

结果:

1
2018-12-26 14:27:26
# python3
python3 unicode 编码
python3 requests 模块发送请求
© 2024 Patrick Pan
Powered by Hexo & NexT.Pisces
0%