Re-arrange code to be cleaner
timestr_match returns int, not uint32_t