The format argument consists of one or more codes; As in printf, the formatting codes is preceded by a percent sign (%). Characters that does not begin with% is copied unchanged to strdest. The Lc_time category of the current locale affects the
ObjectiveInterpretation of related termsThe manifestation of timeTime ModuleDateTime moduleTime Format CodeSummarizeObjectiveIn the development work, we often need to use the date and time, such as:Content output as log informationCalculate the
Logs/error_logCustomlog Logs/access_log Common--The default is that the above section is modified as follows:Errorlog "|/usr/sbin/rotatelogs/var/log/httpd/10.70.25.143:10002.errorlog.%y%m%d%h 7200 480"Customlog "|/usr/sbin/rotatelogs/var/log/httpd/10
Time ModuleThere are three ways to represent time:
Timestamp: Represents the number of seconds since January 1, 1970 0 o'clock to date
Formatted string representation: This representation is more accustomed to our usual reading method,
When constructing various types of data into strings, the powerful features of sprintf seldom disappoint you. Since sprintf and printf have almost the same usage, but the printing destination is different, the former is printed into the string, and
In linux, you can customize your own color scheme, whether it is the color of the linux command prompt or the output color of stdout. In/etc/DIR_COLORS, you can find the following instructions: Shell Code [root @ CentOS ~] # Cat/etc/DIR_COLORS #
In linux, you can customize your own color scheme, whether it is the color of the linux Command Prompt or the output color of stdout.In/etc/DIR_COLORS, you can find the following description: Shell code[Root @ CentOS ~]# Cat/etc/DIR_COLORS # Below
The time module provides a variety of functions and ways to identify the timing value, there are two main formats for identifying time: one is identified as a timestamp, which is the number of seconds from January 1, 1970 0:0, 0 seconds to the
You can use the ctime class to conveniently obtain the current system time and convert it to various formats.
TheFormatArgument consists of one or more codes; as inPrintf, The formatting codes are preceded by a percent sign (%). Characters
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.