Move parse_time to generic util

Also had it raise an exception, rather than exiting directly when it
gets a bad time format.
Add parse_time tests
Fix mispelling of command name