Changing the date in terminal

Hi folks, I would like to be able to change the date in a terminal window instead of the gui.
I have tried some of the commands but can't seem to get it to work.
%D Date 11/13/55
Is what I have tried plus a few variations.
Any help, greatly appreciated.
Ned
Ned_KellyAsked:
Who is Participating?
 
hindmostConnect With a Mentor Commented:
use date with the -s option
to set the date to 17th of march 2002 you would...
date -s 03182002

the format for the string used is MMDDCCYY
Wher M=Month D=Day in Month C=Century Y=Year. (Century is optional. You can add Hour and minute figures to the string as well.

This will only work if you have the appropriate priveleges to set the system clock. Otherwise you'll get an operation not permitted error.
0
 
hindmostCommented:
Actually that example will set the date to the 18th of march. but all the rest of the info is correct <g>
0
 
Ned_KellyAuthor Commented:
Thanks hindmost, thats great.
Appreciated very much.
Have a great day and regards Ned
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.