Changing the Date on your Linux Server
Posted on Friday, December 13th (1466 days ago)
I recently had to set the date on my development server to a date in the future in order to test what would happen to some logic on a site I was working on.
After a little trial and error the way that worked was this:
sudo date 121709302013
The way this works is as follows: I started the command with “sudo” which you may or may not need. This makes the command run with superuser permissions basically.
The date part is the actual command which we follow with a datestamp formatted like: mmddhhmmyyyy.
Thats month month, day day, hour hour, minute minute, year year year year.
You’ll probably want to change it back once you’re done your testing.
About Joseph R. B. Taylor
Joseph R. B. Taylor is a designer/developer who makes stuff for screens of all shapes and sizes. He currently works at Edvisors, Inc. where he creates screen-based experiences for used by millions of college students every year.