diff --git a/adaptors/安心云最新设备数据toES.go b/adaptors/安心云最新设备数据toES.go index f2c9be1..f6ead4a 100644 --- a/adaptors/安心云最新设备数据toES.go +++ b/adaptors/安心云最新设备数据toES.go @@ -127,13 +127,13 @@ func toEsRaw(deviceData *models.DeviceData) *models.EsRaw { if deviceData == nil { return nil } - + var cstZone = time.FixedZone("CST", 8*3600) // 东八区 用以解决 dataOutMeta := deviceData.DeviceInfo.DeviceMeta.GetOutputProps() createNativeRaw := models.EsRaw{ StructId: deviceData.StructId, IotaDeviceName: deviceData.Name, Data: deviceData.Raw, - CollectTime: deviceData.AcqTime.Format("2006-01-02T15:04:05.000+0800"), + CollectTime: deviceData.AcqTime.In(cstZone).Format("2006-01-02T15:04:05.000+0800"), Meta: dataOutMeta, IotaDevice: deviceData.DeviceId, CreateTime: time.Now(),