提交 44c28c15 编写于 作者: 麦壳饼's avatar 麦壳饼

Timestamps must be specified as UTC

上级 19a5c6b2
...@@ -26,7 +26,7 @@ namespace IoTSharp.Data ...@@ -26,7 +26,7 @@ namespace IoTSharp.Data
public class RawMsg public class RawMsg
{ {
public MsgType MsgType { get; set; } public MsgType MsgType { get; set; }
public DateTime ts { get; set; } public DateTime ts { get; set; } = DateTime.Now;
public DeviceStatus DeviceStatus { get; set; } = DeviceStatus.Good; public DeviceStatus DeviceStatus { get; set; } = DeviceStatus.Good;
public Guid DeviceId { get; set; } public Guid DeviceId { get; set; }
public Dictionary<string, object> MsgBody { get; set; } public Dictionary<string, object> MsgBody { get; set; }
......
...@@ -227,7 +227,7 @@ from(bucket: ""{_bucket}"") ...@@ -227,7 +227,7 @@ from(bucket: ""{_bucket}"")
} }
if (point.HasFields()) if (point.HasFields())
{ {
point = point.Timestamp(msg.ts , WritePrecision.Ns); point = point.Timestamp(msg.ts.ToUniversalTime() , WritePrecision.Ns);
lst.Add(point); lst.Add(point);
telemetries.Add(tdata); telemetries.Add(tdata);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册