Converting time_str into Integer