getAnalyticsLogsStatusLog 获取到的日期不对
Tuya MiniApp Tools 版本信息:Node: v18.17.0 Tools: 0.6.6 Ray: 1.5.2
相关代码:
Code: Select all
const fetchLogs = async () => { try { const logs = await getAnalyticsLogsStatusLog({ devId: devInfo.devId, dpIds: '214', offset: 0, limit: 10, });
setLogs(logs.dps || []); const currentTime = new Date(); console.log(currentTime); console.log('logs:', logs); } catch (error) { console.error('Error fetching logs:', error); } };日志信息:
Code: Select all
"2024-07-24T07:33:35.788Z" { "dps": [ { "dpId": 214, "value": "wifi", "timeStamp": 1721705345, "timeStr": "2024-07-23 03:29:05" }, { "dpId": 214, "value": "ethernet", "timeStamp": 1721705366, "timeStr": "2024-07-23 03:29:26" }, { "dpId": 214, "value": "cellular", "timeStamp": 1721705407, "timeStr": "2024-07-23 03:30:07" }, { "dpId": 214, "value": "wifi", "timeStamp": 1721707636, "timeStr": "2024-07-23 04:07:16" }, { "dpId": 214, "value": "ethernet", "timeStamp": 1721707640, "timeStr": "2024-07-23 04:07:20" }, { "dpId": 214, "value": "wifi", "timeStamp": 1721709422, "timeStr": "2024-07-23 04:37:02" }, { "dpId": 214, "value": "ethernet", "timeStamp": 1721804351, "timeStr": "2024-07-24 06:59:11" }, { "dpId": 214, "value": "wifi", "timeStamp": 1721805229, "timeStr": "2024-07-24 07:13:49" }, { "dpId": 214, "value": "cellular", "timeStamp": 1721805296, "timeStr": "2024-07-24 07:14:56" }, { "dpId": 214, "value": "wifi", "timeStamp": 1721805500, "timeStr": "2024-07-24 07:18:20" } ], "hasNext": true, "dpc": [], "total": 1000 }
问题描述 调用该api获取数据,获取到的时间与实际时间不符