In macosx, i can set system time to a static time, such as 2013-01-30 16:43:55 by
date 013016432013
But if i use this command to set date, i should check the date and month because of 30/31 day and add year if after 12-30. This is inconvenient. So who can tell me if there is a method to set date by a interval, for example, i want to set it to one day later.
You can use
date‘s-voption to adjust the output date; for example,date -v+3dwill print the date 3 days from now. If you want to set the system date like this, you need to rundatetwice, once to get what the date will be in a day, then again to set the system date to that: