feat: cb message

This commit is contained in:
zhangsz
2025-07-02 17:23:47 +08:00
parent 758276ecfc
commit 574c39f748
6 changed files with 874 additions and 0 deletions

15
lib/time/time.go Normal file
View File

@@ -0,0 +1,15 @@
package time
import "time"
// 假设 query.StartTime 和 query.EndTime 是 "2006-01-02 15:04:05" 格式字符串
func ParseTimeToMicro(ts string) (int64, error) {
if ts == "" {
return 0, nil
}
t, err := time.ParseInLocation("2006-01-02 15:04:05", ts, time.Local)
if err != nil {
return 0, err
}
return t.UnixMicro(), nil
}