Update interface_influxdb.cpp

This commit is contained in:
jomjol
2023-01-29 14:07:02 +01:00
parent f33d1e4eb1
commit 093775f6ef

View File

@@ -73,7 +73,7 @@ void InfluxDBPublish(std::string _key, std::string _content, std::string _timest
// generate timestamp (TODO: parse result timestamp passed as string and convert it to POSIX timestamp?)
// Format: #define PREVALUE_TIME_FORMAT_OUTPUT "%Y-%m-%dT%H:%M:%S%z"
struct tm tm;
strptime(_timestamp.c_str(), "PREVALUE_TIME_FORMAT_OUTPUT", &tm);
strptime(_timestamp.c_str(), PREVALUE_TIME_FORMAT_OUTPUT, &tm);
time_t t = mktime(&tm); // t is now your desired time_t