python 的time 和datetime模块

time模块:更注重于time,和计时,关注性能

time.localtime()将时间戳转换struct_time元组

time.mktime()将元组转为时间戳

time.strftime()将元组格式化为字符串

time.strptime()将字符串格式化为元组

datetime模块:更注重于date,日期的加减和移动

posted @ 2020-03-14 18:14  duhshowcode  阅读(101)  评论(0)    收藏  举报