summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/domain/entities/events.go2
-rw-r--r--test/e2e/events_test.go2
2 files changed, 3 insertions, 1 deletions
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,
diff --git a/test/e2e/events_test.go b/test/e2e/events_test.go
index 39f495460..3b5b8ac6c 100644
--- a/test/e2e/events_test.go
+++ b/test/e2e/events_test.go
@@ -62,6 +62,8 @@ var _ = Describe("Podman events", func() {
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
Expect(len(result.OutputToStringArray())).To(BeNumerically(">=", 1), "Number of events")
+ date := time.Now().Format("2006-01-02")
+ Expect(result.OutputToStringArray()).To(ContainElement(HavePrefix(date)), "event log has correct timestamp")
})
It("podman events with an event filter and container=cid", func() {