Changing the Date on your Linux Server
Posted on Friday, December 13th (3076 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 humble designer/developer who makes stuff for screens of all shapes and sizes. He is currently the lead UI/UX Architect at MScience, LLC, where he works to create simple experiences on top of large rich datasets for their customers and clients.