mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1984 Ensure QDateTime spec set to UTC
This commit is contained in:
@@ -22,11 +22,8 @@
|
||||
#include "RifSummaryReaderInterface.h"
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class QDateTime;
|
||||
class QString;
|
||||
|
||||
class RifColumnBasedUserDataParser;
|
||||
@@ -53,7 +50,7 @@ public:
|
||||
|
||||
private:
|
||||
std::unique_ptr<RifColumnBasedUserDataParser> m_parser;
|
||||
std::vector< std::vector<time_t> > m_timeSteps;
|
||||
std::vector< std::vector<time_t> > m_timeSteps;
|
||||
|
||||
std::map<RifEclipseSummaryAddress, size_t > m_mapFromAddressToTimeStepIndex;
|
||||
std::map<RifEclipseSummaryAddress, std::pair<size_t, size_t> > m_mapFromAddressToResultIndex;
|
||||
|
||||
@@ -20,12 +20,8 @@
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QLocale>
|
||||
#include <QString>
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct ColumnInfo;
|
||||
|
||||
@@ -160,7 +160,7 @@ void RifEclipseOutputFileTools::timeSteps(ecl_file_type* ecl_file, std::vector<Q
|
||||
int year = 0;
|
||||
getDayMonthYear(kwINTEHEAD, &day, &month, &year);
|
||||
|
||||
QDateTime reportDateTime = RiaQDateTimeTools::createDateTime(QDate(year, month, day));
|
||||
QDateTime reportDateTime = RiaQDateTimeTools::createUtcDateTime(QDate(year, month, day));
|
||||
CVF_ASSERT(reportDateTime.isValid());
|
||||
|
||||
double dayValue = dayValues[i];
|
||||
|
||||
@@ -258,9 +258,7 @@ QDateTime RifHdf5Reader::sourSimDateTimeToQDateTime(std::string dateString) cons
|
||||
QDate d(year, month, day);
|
||||
QTime t(hours, minutes, seconds);
|
||||
|
||||
QDateTime dt;
|
||||
dt.setDate(d);
|
||||
dt.setTime(t);
|
||||
QDateTime dt = RiaQDateTimeTools::createUtcDateTime(d, t);
|
||||
|
||||
return dt;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QDateTime>
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class QDateTime;
|
||||
class QString;
|
||||
|
||||
class RifColumnBasedAsciiParser;
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
virtual std::string unitName(const RifEclipseSummaryAddress& resultAddress) const = 0;
|
||||
|
||||
// TODO: Move this to a tools class with static members
|
||||
static std::vector<QDateTime> fromTimeT(const std::vector<time_t>& timeSteps);
|
||||
static std::vector<QDateTime> fromTimeT(const std::vector<time_t>& timeSteps);
|
||||
|
||||
protected:
|
||||
std::vector<RifEclipseSummaryAddress> m_allResultAddresses;
|
||||
|
||||
Reference in New Issue
Block a user