mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-06-16 04:44:55 +02:00
20 lines
238 B
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)
|
|
}
|