withchao 8e6ee2b80f
feat: v2 to v3 data conversion (#1176)
* feat: v2 to v3 data conversion

* feat: v2 to v3 data conversion
2023-10-10 16:13:44 +00:00

15 lines
207 B
Go

package utils
import "time"
func InitTime(ts ...*time.Time) {
for i := range ts {
if ts[i] == nil {
continue
}
if ts[i].IsZero() || ts[i].UnixMicro() < 0 {
*ts[i] = time.UnixMicro(0)
}
}
}