change time2gps function; convert output to String