Skip to content

Commit a4f598f

Browse files
committed
新增时间毫秒显示
1 parent 1c4aa69 commit a4f598f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/date.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ def test():
143143
print datetime.datetime.strptime('2016-06-06 12:34:54', "%Y-%m-%d %H:%M:%S")
144144
# print datetime.datetime.strptime('2016-06', "%Y-%m-%d %H:%M:%S") # 异常ValueError
145145

146+
# 显示毫秒
147+
print datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')
148+
146149

147150
if __name__ == "__main__":
148151
test()

0 commit comments

Comments
 (0)