Files
open-im-server/tools/data-conversion/utils/time.go
T

15 lines
207 B
Go
Raw Normal View History

2023-10-11 00:13:44 +08:00
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)
}
}
}