time-str->int utility fn.