Uses Unix milliseconds support from standard Go lib

This commit is contained in:
Deluan
2024-05-11 19:50:30 -04:00
parent ec68d69d56
commit 30ae468dc1
6 changed files with 10 additions and 43 deletions
-12
View File
@@ -1,12 +0,0 @@
package utils
import "time"
func ToTime(millis int64) time.Time {
t := time.Unix(0, millis*int64(time.Millisecond))
return t.Local()
}
func ToMillis(t time.Time) int64 {
return t.UnixNano() / int64(time.Millisecond)
}