Date of the Linux command I used-Display, modify system date TimeThis article link: http://codingstandards.iteye.com/blog/1157513 (reproduced please specify the source)Description of UseThe ATE command can be used to display and modify the system
Description of UseThe ATE command can be used to display and modify the system datetime, noting that it is not a time command.Common parametersFormat: DateDisplays the current date time.Format: Date mmddhhmmFormat: Date mmddhhmmyyyyFormat: Date
Use the function date () to implement the displayed in the format: year-month-day hours: minutes: secRelated Time parameters:A-"AM" or "PM"A-"AM" or "PM"D-A few days, two digits, if less than two digits before the 0; such as: "01" to "31"D-Days of
Common parametersFormat: DateDisplays the current date time.Format: Date mmddhhmm # In short, it's the day of the month.Format: Date mmddhhmmyyyyFormat: Date MMDDHHMM.SSFormat: Date MMDDHHMMYYYY.SSSet the current date time, only the root user can
PHP date query function code
Date_default_timezone_set ('prc'); // Default time zone
Echo "today:", date ("Y-m-d", time ()),"";
Echo "today:", date ("Y-m-d", strtotime ("18 Jun 2008 ")),"";
Echo
Get a date of n days
public static Date getTime (int day) {
Calendar objcalendar=calendar.getinstance ();
Objcalendar.add (calendar.date,day);
Date objdate=objcalendar.gettime ();
System.out.print (objdate);
return objdate;
}/**
Common time processing method of PHP date function
This article mainly introduces the PHP date function commonly used time processing method, this article introduces to get today, tomorrow, yesterday, a week later, one months ago, one months after
PHP Date function common time processing method, date processing method
Copy the Code code as follows:echo "Today:". Date ("y-m-d"). "";echo "Yesterday:". Date ("Y-m-d", Strtotime ("-1 Day")), "";echo "Tomorrow:". Date ("Y-m-d", Strtotime ("+1 Day")
This article mainly introduced the PHP date function commonly used time processing method, this article introduced obtains today, tomorrow, yesterday, one week, one months ago, one months after time method, needs the friend to be possible to refer
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.