taoCMS是基于php+sqlite/mysql的国内最小(100Kb左右)的功能完善、开源免费的CMS管理系统

python datetime转换

#把datetime转成字符串def datetime_toString(dt):    return dt.strftime("%Y-%m-%d-%H")#把字符串转成datetimedef string_toDatetime(string):    return datetime.strptime(string, "%Y-%m-%d-%H")#把字符串转成时间戳形式def string_toTimestamp(strTime):    return time.mktime(string_toDatetime(strTime).timetuple())#把时间戳转成字符串形式def timestamp_toSt
发布时间:2013-10-22 | 类别:未分组 | 阅读:257533 | 评论:0 | 标签:datetime datetime

公告

taoCMS发布taoCMS 3.0.2(最后更新21年03月15日),请大家速速升级,欢迎大家试用和提出您宝贵的意见建议。

捐助与联系

☟请使用新浪微博联系我☟

☟在github上follow我☟

标签云