1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-16 04:44:55 +02:00
antelope-api-healthcheck/internal/utils/time.go

20 lines
238 B
Go

package utils
import (
"time"
)
type Time struct {
ts time.Time
}
func (t *Time) SetTime(value time.Time) {
t.ts = value
}
func (t Time) GetTime() time.Time {
if !t.ts.IsZero() {
return t.ts
}
return time.Now().In(time.UTC)
}