Fix datetime function
This commit is contained in:
+1
-1
@@ -317,7 +317,7 @@ def telemetry():
|
|||||||
return jsonify({"error": "Expected a JSON object/dictionary"}), 400
|
return jsonify({"error": "Expected a JSON object/dictionary"}), 400
|
||||||
|
|
||||||
# Stamp UTC timestamp for Node-RED queries
|
# Stamp UTC timestamp for Node-RED queries
|
||||||
data["received_at"] = datetime.now(datetime.timezone.utc).isoformat()
|
data["received_at"] = datetime.now(timezone.utc).isoformat()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
telemetry_collection.insert_one(data)
|
telemetry_collection.insert_one(data)
|
||||||
|
|||||||
Reference in New Issue
Block a user