mirror of
https://github.com/Icinga/icingadb.git
synced 2026-06-09 00:42:37 -04:00
UnixMilli(x): don't overflow on 4/11/2262 (UTC)
but on 8/17/292278994 by not converting x into int64 ns and those to ms.
This commit is contained in:
parent
e0859c55a0
commit
2bc92cbab7
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ func FromUnixMilli(ms int64) time.Time {
|
|||
|
||||
// UnixMilli returns milliseconds since the Unix epoch of time t.
|
||||
func UnixMilli(t time.Time) int64 {
|
||||
return t.UnixNano() / 1e6
|
||||
return t.UnixMilli()
|
||||
}
|
||||
|
||||
// Name returns the declared name of type t.
|
||||
|
|
|
|||
Loading…
Reference in a new issue