From 5aedcb36435048dc06a18476aed2cfda1bf41031 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Fri, 17 Dec 2021 14:56:32 +0100 Subject: remote events: convert TimeNano properly e.TimeNano contains nanoseconds since epoch, not just the nanoseconds after e.Time. time.Unix supports nanoseconds > 999999999 and converts them to seconds, so just passing e.TimeNano is enough. Signed-off-by: Leah Neukirchen --- pkg/domain/entities/events.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/domain/entities/events.go b/pkg/domain/entities/events.go index 73a375b94..fa815d7b9 100644 --- a/pkg/domain/entities/events.go +++ b/pkg/domain/entities/events.go @@ -42,7 +42,7 @@ func ConvertToLibpodEvent(e Event) *libpodEvents.Event { Image: image, Name: name, Status: status, - Time: time.Unix(e.Time, e.TimeNano), + Time: time.Unix(0, e.TimeNano), Type: t, Details: libpodEvents.Details{ Attributes: details, -- cgit v1.2.3-54-g00ecf