I saw a machine this morning. Time does not match, this thought the system time and the network Beijing time is not synchronized, on the terminal command performs the network time synchronization
[Root@localhost ~]# ntpdate time.windows.com
The date class
in Java.util
www.linuxaid.com.cn 01-09-20 23:03 496p everywhere
--------------------------------------------------------------------------------
in JSP, we often have to deal with the date and time information, when you can
Concept | advanced
Java Advanced Date Concepts
If your Java program displays time and date to users in different time zones or different countries, you need to understand some of the more advanced aspects of the Java date
Date--helpUsage: date [options] ... [+ format]Or: Date [-u|--utc|--universal] [MMDDHHMM[[CC]YY][.SS]]Displays the current time in the given format, or sets the system date.-D,--date= string displays the time described by the specified string, not
Get the date of the dayDate +%y-%m-%dOutput: 2011-07-28Assigns the current date to a date variabledate=$ (Date +%y%m%d)Sometimes we need to use dates before or after today, so we can use the-D parameter of dateGet Tomorrow's dateDate-d Next-day
Date functionDate functions manipulate Date values (fields of date type), timestamp values (TIMESTAMP, TIMESTAMP with time ZONE, and TIMESTAMP with the fields of the local time ZONE type), and interval values (INTERVAL day to SECOND and INTERVAL
Display time is a commonly used command. It is often used to display date-related file names or times in shell scripts. The date command is used in both Linux and Windows.
Date command usage in Linux
Date [Option]… [+ Format]
Date [-u | -- UTC | -
Sysdate[Function]: returns the current date. [Parameter]: No parameter, no brackets [Return]: Date [Example] select sysdate hz from dual; return:
Add_months (d1, n1)[Function]: return the new date after the date d1 plus the n1 month. [Parameter]: d1,
Display time is a common command, and it is often used in writing shell scripts to display date-related file names or times. The date command is both Linux and Windows.The use of the date command under Linux
Date [OPTION] ... [+format]
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.