Exiv2 is a C++ library and a command line utility to manage image metadata. http://www.exiv2.org.
Rotations and exif orientation values:
Example:
exiv2 -M"set Exif.Image.Orientation 6" *jpg
Information on orientation here: http://jpegclub.org/exif_orientation.html
Use -a to change time and date.
Example: to add 5 hours, use:
exiv2 -a 5 *jpg
I set the year wrong on a camera (was 2007, should have been 2008). I used:
exiv2 -Y1 *jpg
to correct it.
To subtract use:
exiv2 -Y'-1' *jpg