Howto: Set Time Manually on Linux
Last Updated on Monday, 1 September o 09:52
Written by admin
Monday, 1 September o 09:48
nn is a two digit month, between 01 to 12
dd is a two digit day, between 01 and 31, with the regular rules for days according to month and year applying
hh is two digit hour, using the 24-hour period so it is between 00 and 23
mm is two digit minute, between 00 and 59
yyyy is the year; it can be two digit or four digit: your choice.
ss is two digit seconds. Notice the period ‘.’ before the ss
sudo date yournewdatetimehere
where yournewdatetimehere has to follow the format nnddhhmmyyyy.ss which is described above.
Say we want to change the date to January 1, 2008 with the time 21:50:20.
Here is a working example for you:
sudo date 010121502008.20
Leave a Reply
Because I value your thoughtful opinions, I encourage you to add a comment to this discussion. Don't be offended if I edit your comments for clarity or to keep out questionable matters, however, and I may even delete off-topic comments.