Python built-in time module

1. Datetime time module

In a nutshell, there are several main concepts involved in time and date processing modules and libraries, including:

Date, time, timestamp, time and string conversion, time zone, etc.

Among the three modules of Datetime, Time, and Calendar, we use Datetime more, and here we introduce it in more detail.

For the Datetime module, it sorts out three aspects of building time object instances, time conversion, and time object operations, involving a total of 13 knowledge points. The outline of the arrangement is as follows:

For the Time module, it is sorted out from two aspects of time acquisition and time conversion, involving a total of 6 knowledge points, and the outline of the arrangement is as follows: 

The first thing to introduce is the datetime module that you usually use a lot. It is a built-in module of Python and has relatively complete functions. 

1. Build a time object instance

import datetime
# from datetime import date, datetime,time,timedelta,tzinfo
import time

The construction of time instance includes date (such as October 12, 2020), time (such as 20:10:01 ÿ

Guess you like

Origin blog.csdn.net/qq_35029061/article/details/130419023