Ano-Tech Computers
Enter keyword:

Setting the time and date in Linux
Problem:
The "date" command is used for setting time and date, but the syntax is far from obvious.
 
Solution:
As an example, to set the current time and date to July 31, 11:16pm, type "date 07312316" (note that the time is given in 24 hour notation).

If you wanted to change the year as well, you could type "date 073123161998".

To set the seconds as well, type "date 07312316.30" or "date 073123161998.30".

To see what Linux thinks the current local time is, run date with no arguments

More information can be found here:
http://www.linuxsa.org.au/tips/time.html
 
Discuss this solution
Did this article solve your problem? Yes No Did not apply

We welcome anyone who is willing to contribute to this public knowledge base, contact siteadmin@atc.no if you have information you would like to share. The idea is not to replace the commercial support sites, but to publish those hard-to-find solutions you've found yourself looking for over and over again.

Show all articles