time模块图表记忆

time模块一张图理解记忆

标准格式时间 2016-11-15 11:08:27

时间戳 1970年至今的秒数

gmtime 显示全球时间   localtime 显示当地(北京)时间

 

 

人看        自定义格式 %Y-%m-%d %H-%M-%S

                                                                            标准格式

                       ^              |                                 ^                   |

                        |              V                                 |                   v

               strftime           strptime                      asctime         srtptime(%Y-%m-%d %X)

机器看                                      struct_time九元组

                                             ^         |                           ^    ctime

                                             |          v                           |

                     gmtime loacltime           mktime                  |

                                              时间戳 --------------------------

posted on 2016-12-03 17:08  lexn  阅读(81)  评论(0编辑  收藏  举报

导航