CVS accepts a wide ragne of syntax to specify dates. You'll never go wrong if you use ISO8601 format, which is the format used in the preceding examples. You can also use internet email dates as described in RFC822 and RFC1123. Finally, you can use certain unambiguous english constructs to specify dates relative to the current date.

You probably never need all of the formats available, but here are some more examples to give you an idea of what CVS accepts:

cvs update -D "19 Apr 2010"
cvs update -D "19 Apr 2010 10:04"
cvs update -D "19/04/2010"
cvs update -D "4 days ago"
cvs update -D "3 years ago"
cvs update -D "20 March 2014 23:59:59 PDT"
cvs update -D "10 Apr"

The double quotes around the dates are there to ensure that the Unix shell treats the date as one argument even if it contains spaces. The quotes will do no harm if the date doesn't contain spaces, so it's probably best to always use them.

Note: the example just use 'update' in the example, similarily, you can also use the same rule in other command which also works with -D, for example:

cvs checkout -D "2 days ago"




Comments powered by CComment