mirror of
https://github.com/OpenMTC/OpenMTC.git
synced 2025-02-28 11:10:31 +00:00
Hotfix for the wrong timestamp type
This commit is contained in:
parent
7c35afbb0c
commit
04a8929a97
@ -2,6 +2,7 @@ from urllib.parse import urljoin
|
||||
import logging
|
||||
|
||||
import requests
|
||||
from datetime import datetime
|
||||
|
||||
from futile.logging import LoggerMixin
|
||||
|
||||
@ -89,7 +90,7 @@ class OrionAPI(LoggerMixin):
|
||||
"type": self._get_type(data_senml["v"]),
|
||||
"metadata": {
|
||||
"timestamp": {
|
||||
"value": data_senml["t"],
|
||||
"value": datetime.fromtimestamp(data_senml["t"]).replace(microsecond=0).isoformat(),
|
||||
"type": "String"
|
||||
},
|
||||
"bn": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user