mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-27 01:48:19 +03:00
Update interface_influxdb.cpp
This commit is contained in:
@@ -71,7 +71,9 @@ void InfluxDBPublish(std::string _key, std::string _content, std::string _timest
|
||||
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "InfluxDBPublish - Key: " + _key + ", Content: " + _content + ", Timestamp: " + _timestamp);
|
||||
|
||||
// generate timestamp (TODO: parse result timestamp passed as string and convert it to POSIX timestamp?)
|
||||
time_t now = time(NULL);
|
||||
// time_t now = time(NULL);
|
||||
time_t now;
|
||||
time(&now);
|
||||
char nowTimestamp[21];
|
||||
// pad with zeroes to get nanoseconds
|
||||
sprintf(nowTimestamp,"%jd000000000", (intmax_t)now);
|
||||
|
||||
Reference in New Issue
Block a user