Ctime related functions

Source: Internet
Author: User

Day duration: the number of seconds from 00:00:00, January 1, January 1, 1970, UTC time.

Decomposition: struct TM structure.

 

Time_t time (time_t * timer); // obtain the calendar time.

Struct TM * gmtime (const time_t * timer); // The GMT time for the duration of the decomposition.

Struct TM * localtime (const time_t * timer); // The local time when the log is decomposed.

Char * asctime (const struct TM * timeptr); // when splitting-> string, directly enter the TM structure data into the string

Char * ctime (const time_t * timer); // calendar-> string, displayed according to local time zone

Double difftime (time_t time1, time_t time0); // calculate the time difference

Time_t mktime (struct TM * timeptr); // Decomposition Time-> day duration, which is interpreted as the local time zone

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.