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)
raw = tmp;
}
if (localTime) {
convertFromLocal();
}
return;
}
/* Not successful - throw exception */
......
......@@ -175,13 +175,14 @@ void DCDBQuery::genOutput(std::list<DCDB::SensorDataStoreReading> &results, quer
std::cout << start->first.name << ",";
/* Print the time stamp */
if (useLocalTime)
ts.convertToLocal();
if (useRawOutput)
if (useRawOutput) {
std::cout << ts.getRaw();
else
} else {
if (useLocalTime) {
ts.convertToLocal();
}
std::cout << ts.getString();
}
int64_t value, result;
/* 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