From 4f452dbfcd7c284d26776e676763e7dbb1775d99 Mon Sep 17 00:00:00 2001 From: lucas Date: Wed, 4 Dec 2024 11:17:55 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=BC=BA=E5=88=B6=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=208=20=E6=97=B6=E5=8C=BA=20=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adaptors/安心云最新设备数据toES.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(),