zhangqian
2024-12-12 6fed72886be64839fae6a5c749157d94a06f4d2d
解决时区问题
1个文件已修改
2 ■■■ 已修改文件
models/gather_model.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/gather_model.go
@@ -308,7 +308,7 @@
                                        if gatherEvents, ok := floorBucket.(map[string]interface{})["gather_events"].(map[string]interface{})["buckets"].([]interface{}); ok {
                                            for _, eventBucket := range gatherEvents {
                                                key := int64(eventBucket.(map[string]interface{})["key"].(float64)) / 1000 // 将毫秒转换为秒
                                                timestamp := time.Unix(key, 0).Format("2006-01-02 15:04:05")
                                                timestamp := time.Unix(key, 0).UTC().Format("2006-01-02 15:04:05")
                                                // 解析人员
                                                if peopleBuckets, ok := eventBucket.(map[string]interface{})["people"].(map[string]interface{})["buckets"].([]interface{}); ok {