JSON FIWARE Orion Context Broker 全局实例上的时间戳错误
JSON timestamp wrong on FIWARE Orion Context Broker global instance
我正在向 http://orion.lab.fiware.org:1026/v2/entities/85/attrs?type=UrbansenseLocation 发送 POST 请求以更新 atime 和 bundle 属性:
{
"atime":{
"type":"Number",
"value":1476370651},
"bundle":{
"type":"Number",
"value":1}
}
并且对同一实体的 GET 请求收到以下响应:
{
"id": "85",
"type": "UrbansenseLocation",
"atime": {
"type": "Number",
"value": 1476370000,
"metadata": {}
},
"bundle": {
"type": "Number",
"value": 1,
"metadata": {}
},
//some other attributes
}
请注意 atime 属性的值字段不匹配!!!为什么会发生这样的事情?
谢谢。
我知道 atime
是一个日期时间。在这种情况下,我建议使用 DateTime
属性类型。这将为属性提供更好的语义并且应该避免任何数字渲染问题(如 are being discussed right now at github)。
有关 DateTime
类型的更多信息,请参见 NGSIv2 specification (section "Special Attribute Types") and this document(查找 "Datetime support" 幻灯片)。
我正在向 http://orion.lab.fiware.org:1026/v2/entities/85/attrs?type=UrbansenseLocation 发送 POST 请求以更新 atime 和 bundle 属性:
{
"atime":{
"type":"Number",
"value":1476370651},
"bundle":{
"type":"Number",
"value":1}
}
并且对同一实体的 GET 请求收到以下响应:
{
"id": "85",
"type": "UrbansenseLocation",
"atime": {
"type": "Number",
"value": 1476370000,
"metadata": {}
},
"bundle": {
"type": "Number",
"value": 1,
"metadata": {}
},
//some other attributes
}
请注意 atime 属性的值字段不匹配!!!为什么会发生这样的事情?
谢谢。
我知道 atime
是一个日期时间。在这种情况下,我建议使用 DateTime
属性类型。这将为属性提供更好的语义并且应该避免任何数字渲染问题(如 are being discussed right now at github)。
有关 DateTime
类型的更多信息,请参见 NGSIv2 specification (section "Special Attribute Types") and this document(查找 "Datetime support" 幻灯片)。