mirror of
https://github.com/OpenMTC/OpenMTC.git
synced 2025-03-01 03:16:11 +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 logging
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
from futile.logging import LoggerMixin
|
from futile.logging import LoggerMixin
|
||||||
|
|
||||||
@ -89,7 +90,7 @@ class OrionAPI(LoggerMixin):
|
|||||||
"type": self._get_type(data_senml["v"]),
|
"type": self._get_type(data_senml["v"]),
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"timestamp": {
|
"timestamp": {
|
||||||
"value": data_senml["t"],
|
"value": datetime.fromtimestamp(data_senml["t"]).replace(microsecond=0).isoformat(),
|
||||||
"type": "String"
|
"type": "String"
|
||||||
},
|
},
|
||||||
"bn": {
|
"bn": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user