v0.0.393
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m19s

This commit is contained in:
2024-02-21 18:33:18 +01:00
parent c25da03217
commit 1007f2c834
2 changed files with 11 additions and 2 deletions

View File

@@ -125,6 +125,15 @@ func NewTime(h int, m int, s int, ns int) Time {
}
}
func NewTimeFromTS(t time.Time) Time {
return Time{
Hour: t.Hour(),
Minute: t.Minute(),
Second: t.Second(),
NanoSecond: t.Nanosecond(),
}
}
func NowTime(loc *time.Location) Time {
now := time.Now().In(loc)
return NewTime(now.Hour(), now.Minute(), now.Second(), now.Nanosecond())