01. Time () provides second-level precision02.03.1 header file 04.2 function prototype05. time_t time (time_t * timer)06. The function returns the number of seconds from TC1970-1-1 0: 0 to the present07.08. Use the time () function combined with
Function category:1. Set the time: settimeofday, tzset2. Get time: time, ftime, gettimeofday3. Time Format Conversion: mktime, strftime; gmtime, localtime; asctime, ctime4. Others: Clock, difftime
Asctime: represents the time and date in string
Linux/unix-time timestamp processing conversion functionThe time function under LinuxWe can often use time in programming, such as getting the system time (to get the system's year, month, day, hour, minute, second, week, etc.), or to do something
AsctimeCtimeGettimeofdayGmtimeLocaltimeMktimeSettimeofdayTime
Asctime (represents the time and date in string format)
Related functions
Time, ctime, gmtime, localtime
Header file
# Include
Define functions
Asctime (represents the time and date in string format)
#include
Define functions
char * asctime(const struct tm * timeptr);
Function Description
Asctime () converts the information in the TM structure referred to by the timeptr parameter to the
AsctimeCtimeGettimeofdayGmtimeLocaltimeMktimeSettimeofdayTime
Asctime (represents the time and date in string format)
Related functions
Time, ctime, gmtime, localtime
Header file
# Include
Define functions
Date and time (asctimectimegettimeofdaygmtimelocaltimemktimesettimeofdaytimeasctime (expressed in string format) related functions time, ctime, gmtime, localtime header file # include & lt; time. h & gt; define the function char * ascti
Date and
C language Time FunctionsC Standard library functions include a series of date and time processing functions, which are described in the header file. These functions are listed below. Three types are defined in the header file: time_t, struct TM,
First, the Linux common time correlation function-asctime,ctime,getttimeofday,gmtime,localtime,mktime,settimeofday,timeAsctime: Converting dates to stringsCTime: Converts a number of seconds into a stringGettimeofday: Gets the time and date based on
//-------------------------------------------------------------//
Asctime (representing time and date in string format)
#include
Defining functions
char * asctime (const struct TM * timeptr);Function description
asctime () converts the
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.