/// Fill the TimeTag object \a btime with time information found in /// string \a str formatted according to string \a fmt. void scanTime( TimeTag& btime, const string& str, const string& fmt ) { try { // Get the mapping of character (from fmt) to value (from str). TimeTag::IdToValue info; TimeTag::getInfo( str, fmt, info ); if( btime.setFromInfo( info ) ) { return; } // Convert to CommonTime, and try to set using all formats. CommonTime ct( btime.convertToCommonTime() ); scanTime( ct, str, fmt ); // Convert the CommonTime into the requested format. btime.convertFromCommonTime( ct ); } catch( gpstk::InvalidRequest& ir ) { GPSTK_RETHROW( ir ); } catch( gpstk::StringUtils::StringException& se ) { GPSTK_RETHROW( se ); } }