res = datetime.now() - old_sec
print res.total_seconds()
new_sec = old_sec + timedelta(seconds=3)
print "old_sec(%s) + timedelta(seconds=3) : %s" % (res_time, str(new_sec))
print "*" * 20
print "time.strptime"
t = time.strptime("2017-09-01,12:03:04", "%Y-%m-%d,%I:%M:%S")
print t
[popexizhi: 如何只使用time做时间的加减呢?]
没有评论:
发表评论