Python Time Module

Source: Internet
Author: User

Time Module

Command

Time.time (): Get Time Rub

Time.timezone: The standard time UTC time is less than the number of seconds.

Time.altzone: Daylight Saving time DST is less than the number of seconds.

Time.daylight: Whether to use daylight saving time, 0 is not used

Time.sleep (2): Sleep a few seconds. Then proceed down.

Time.gmtime: Returns a tuple, a time format. The default is UTC time, which can be added to the time rub.

Time.localtime: Returns a tuple, a time format. The default is local time zone times can be added to time rub.

Time.mktime (tuple variable): You can find the time rub of the tuple.

Strftime ("Time parameter"): the custom time format.

Time.strptime ("string", "format"): Converts to tuples.

Asctime (format, tuple): The conversion element consists of a string. Default local time.

Ctme (format, Time rub): convert time to rub, convert to string. Default local time.

Python Time Module

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.