2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 3c263553 authored by Michael Ott's avatar Michael Ott
Browse files

Don't apply local timezone conversion for Unix timestamps

parent 2a345c4b
...@@ -127,10 +127,6 @@ void TimeStamp::guessFromString(std::string timestr, bool localTime) ...@@ -127,10 +127,6 @@ void TimeStamp::guessFromString(std::string timestr, bool localTime)
raw = tmp; raw = tmp;
} }
if (localTime) {
convertFromLocal();
}
return;
} }
/* Not successful - throw exception */ /* Not successful - throw exception */
......
...@@ -175,13 +175,14 @@ void DCDBQuery::genOutput(std::list<DCDB::SensorDataStoreReading> &results, quer ...@@ -175,13 +175,14 @@ void DCDBQuery::genOutput(std::list<DCDB::SensorDataStoreReading> &results, quer
std::cout << start->first.name << ","; std::cout << start->first.name << ",";
/* Print the time stamp */ /* Print the time stamp */
if (useLocalTime) if (useRawOutput) {
ts.convertToLocal();
if (useRawOutput)
std::cout << ts.getRaw(); std::cout << ts.getRaw();
else } else {
if (useLocalTime) {
ts.convertToLocal();
}
std::cout << ts.getString(); std::cout << ts.getString();
}
int64_t value, result; int64_t value, result;
/* Print the sensor value */ /* Print the sensor value */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment