Follow us on Twitter...
Stay up to date with the latest news, special offers and advice from CensorNet on Twitter... we are Tweeting regularly!
How to set the Date/Time from the command line
In order to set the date/time at the Linux command line, you have to type in a string of digits in the correct order.
I am writing this document at 10:11 local time on February 26th 2009. If I wanted to set a Linux clock to that time I would type :
date 02261011
This string is made up as follows
The 02 is the month. February is the second month. The 26 is the date within the month. The 10 is the hour, 10am in this case. The 11 is the minutes past the hour.
This would normally work unless your clock had been so incorrect that you need to reset the year as well. In this case, you could type
date 022610112009
The last four digits are the year, fully specified.