From 68e37dedb4c786a7f95ab9ac750079847820edcd Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Mon, 19 Jun 2017 11:58:30 +0200 Subject: [PATCH] Using std::time_t from TimeMap --- ebos/eclproblem.hh | 5 +---- ebos/ertwrappers.hh | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index 44c5674416..9fe9216cf6 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -349,10 +349,7 @@ public: // Set the start time of the simulation const auto& timeMap = simulator.gridManager().eclState().getSchedule().getTimeMap(); - tm curTime = boost::posix_time::to_tm(timeMap.getStartTime(/*timeStepIdx=*/0)); - - Scalar startTime = std::mktime(&curTime); - simulator.setStartTime(startTime); + simulator.setStartTime( timeMap.getStartTime(/*timeStepIdx=*/0) ); // We want the episode index to be the same as the report step index to make // things simpler, so we have to set the episode index to -1 because it is diff --git a/ebos/ertwrappers.hh b/ebos/ertwrappers.hh index 211da5ec0f..643a652394 100644 --- a/ebos/ertwrappers.hh +++ b/ebos/ertwrappers.hh @@ -575,14 +575,12 @@ public: // the correct start time has not yet been set in the // simulator, so we extract it from the ECL deck->.. - tm curTime = boost::posix_time::to_tm(timeMap.getStartTime(/*timeStepIdx=*/0)); - double startTime = std::mktime(&curTime); ertHandle_ = ecl_sum_alloc_writer(caseName.c_str(), /*formatted=*/false, /*unified=*/true, /*joinString=*/":", - startTime, + timeMap.getStartTime(/*timeStepIdx=*/0), /*timeIsInDays=*/true, // if not, it's hours... eclGrid.getNX(), eclGrid.getNY(),