Add unit tests for timestr()