add API function for parsing strings to time_t (issue #6320, with mods)