mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7403 Replace toTime_t with toSecsSinceEpoch
This commit is contained in:
@@ -231,7 +231,7 @@ std::vector<time_t> RifColumnBasedUserData::createTimeSteps( const TableData& ta
|
||||
for ( const auto& timeStepValue : ci.values )
|
||||
{
|
||||
QDateTime dateTime = RiaQDateTimeTools::fromYears( timeStepValue );
|
||||
tsVector.push_back( dateTime.toTime_t() );
|
||||
tsVector.push_back( dateTime.toSecsSinceEpoch() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ std::vector<time_t> RifColumnBasedUserData::createTimeSteps( const TableData& ta
|
||||
for ( const auto& timeStepValue : ci.values )
|
||||
{
|
||||
QDateTime dateTime = RiaQDateTimeTools::addDays( simulationStartDate, timeStepValue );
|
||||
tsVector.push_back( dateTime.toTime_t() );
|
||||
tsVector.push_back( dateTime.toSecsSinceEpoch() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ std::vector<time_t> RifColumnBasedUserData::createTimeSteps( const TableData& ta
|
||||
for ( const auto& timeStepValue : ci.values )
|
||||
{
|
||||
QDateTime dateTime = RiaQDateTimeTools::addYears( simulationStartDate, timeStepValue );
|
||||
tsVector.push_back( dateTime.toTime_t() );
|
||||
tsVector.push_back( dateTime.toSecsSinceEpoch() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ std::vector<time_t> RifColumnBasedUserData::createTimeSteps( const TableData& ta
|
||||
{
|
||||
QDateTime dt = RiaDateStringParser::parseDateString( s );
|
||||
|
||||
tsVector.push_back( dt.toTime_t() );
|
||||
tsVector.push_back( dt.toSecsSinceEpoch() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -458,7 +458,7 @@ bool RifCsvUserDataParser::parseColumnBasedData( const AsciiDataParseOptions& pa
|
||||
if ( m_errorText ) m_errorText->append( "CSV import: Failed to parse date time value" );
|
||||
throw 0;
|
||||
}
|
||||
col.dateTimeValues.push_back( dt.toTime_t() );
|
||||
col.dateTimeValues.push_back( dt.toSecsSinceEpoch() );
|
||||
}
|
||||
}
|
||||
catch ( ... )
|
||||
@@ -579,7 +579,7 @@ bool RifCsvUserDataParser::parseLineBasedData()
|
||||
}
|
||||
|
||||
auto& samples = addressesAndData[addr];
|
||||
samples.push_back( std::make_pair( dateTime.toTime_t(), value ) );
|
||||
samples.push_back( std::make_pair( dateTime.toSecsSinceEpoch(), value ) );
|
||||
}
|
||||
|
||||
// ERROR VALUE
|
||||
@@ -592,7 +592,7 @@ bool RifCsvUserDataParser::parseLineBasedData()
|
||||
if ( !parseOk ) value = DOUBLE_INF;
|
||||
|
||||
auto& samples = addressesAndData[errAddr];
|
||||
samples.push_back( std::make_pair( dateTime.toTime_t(), value ) );
|
||||
samples.push_back( std::make_pair( dateTime.toSecsSinceEpoch(), value ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ bool RifKeywordVectorUserData::parse( const QString& data, const QString& custom
|
||||
for ( const auto& timeStepValue : m_parser->keywordBasedVectors()[i].values )
|
||||
{
|
||||
QDateTime dateTime = RiaQDateTimeTools::addDays( startDate, timeStepValue );
|
||||
ts.push_back( dateTime.toTime_t() );
|
||||
ts.push_back( dateTime.toSecsSinceEpoch() );
|
||||
}
|
||||
}
|
||||
else if ( unitText == "YEAR" || unitText == "YEARS" )
|
||||
@@ -125,7 +125,7 @@ bool RifKeywordVectorUserData::parse( const QString& data, const QString& custom
|
||||
for ( const auto& timeStepValue : m_parser->keywordBasedVectors()[i].values )
|
||||
{
|
||||
QDateTime dateTime = RiaQDateTimeTools::fromYears( timeStepValue );
|
||||
ts.push_back( dateTime.toTime_t() );
|
||||
ts.push_back( dateTime.toSecsSinceEpoch() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user