首页 > 代码库 > Python 学习6

Python 学习6

Time module:

1. Time() meaning how many second passed after year 1970.(epoch)

2. Gmtime()(takes one argument) function convert the timestamp to struct_time class. The following table shows the property of the class

技术分享

 

3. If we would like to use strftime() function. we have get the time first.

4. If we are using datetime instance, we will get a series of number instead of string.    datetime.datetime(2015, 12, 31, 0, 0)

Python 学习6