Skip to content

Commit

Permalink
update time
Browse files Browse the repository at this point in the history
  • Loading branch information
llinjupt committed Jul 18, 2019
1 parent b77ef87 commit 8513a7b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Binary file removed imgs/time_convert.jpg
Binary file not shown.
Binary file added imgs/time_convert.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions time.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ time.gmtime() 和 time.localtime() 可以接受一个时间戳为参数,如果
:linenos:
:lineno-start: 0
# 以下两种方式是等价的
print(time.ctime())
print(time.asctime(time.localtime())) # 与 time.ctime() 等价
print(time.asctime(time.localtime()))
print(time.ctime(0))
Expand Down Expand Up @@ -228,8 +229,8 @@ Python 中常用的时间格式化符号如下所示:

时间字符串无法直接转换为时间戳,需要先转换为9元组。下图以更清晰的方式展现了它们之间的转换关系。

.. figure:: imgs/time_convert.jpg
:scale: 90%
.. figure:: imgs/time_convert.png
:scale: 50%
:align: center
:alt: Time convert chart

Expand Down

0 comments on commit 8513a7b

Please sign in to comment.