From 1227413a5ab1506ae75cefce803a8505e6168f85 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Mon, 5 Jun 2023 15:07:17 +0200 Subject: [PATCH] fix timestamp format Signed-off-by: jkoberg --- services/eventhistory/pkg/service/service_test.go | 3 ++- services/graph/pkg/service/v0/personaldata.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/services/eventhistory/pkg/service/service_test.go b/services/eventhistory/pkg/service/service_test.go index 2591b8c3840..88272731790 100644 --- a/services/eventhistory/pkg/service/service_test.go +++ b/services/eventhistory/pkg/service/service_test.go @@ -10,6 +10,7 @@ import ( userv1beta1 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" "github.com/cs3org/reva/v2/pkg/events" "github.com/cs3org/reva/v2/pkg/store" + "github.com/cs3org/reva/v2/pkg/utils" "github.com/google/uuid" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -66,7 +67,7 @@ var _ = Describe("EventHistoryService", func() { }, }, Failed: false, - Timestamp: time.Time{}, + Timestamp: utils.TimeToTS(time.Time{}), }) ids[1] = bus.Publish(events.UserCreated{ UserID: "another-id", diff --git a/services/graph/pkg/service/v0/personaldata.go b/services/graph/pkg/service/v0/personaldata.go index ce7c10c2cf5..abfcb06a84c 100644 --- a/services/graph/pkg/service/v0/personaldata.go +++ b/services/graph/pkg/service/v0/personaldata.go @@ -129,7 +129,7 @@ func (g Graph) GatherPersonalData(usr *user.User, ref *provider.Reference, token if err := events.Publish(g.eventsPublisher, events.PersonalDataExtracted{ Executant: usr.GetId(), - Timestamp: time.Now(), + Timestamp: utils.TimeToTS(time.Now()), ErrorMsg: errmsg, }); err != nil { g.logger.Error().Err(err).Msg("cannot publish event")