pythonz之time库常用方法

ime.time() 获取当前时间戳。
time.ctime() 当前时间的字符串形式。
time.localtime() 当前时间的 struct_time 形式。
time.strftime() 用来获得当前时间,可以将时间格式化为字符串。

Python 中时间日期格式化符号(区分大小写):

 

posted @ 2021-12-26 16:54  菩提浪子  阅读(203)  评论(0)    收藏  举报