From ca637de017ba9df6887226605b69863987d26cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Wed, 19 Apr 2023 13:21:37 +0200 Subject: [PATCH] Fix detecting resources that haven't changed when reindexing spaces This is a regression introduced with the experimental search backport. --- services/search/pkg/content/basic.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/search/pkg/content/basic.go b/services/search/pkg/content/basic.go index ba95ad38ed..0130584bab 100644 --- a/services/search/pkg/content/basic.go +++ b/services/search/pkg/content/basic.go @@ -6,6 +6,7 @@ import ( storageProvider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" "github.com/cs3org/reva/v2/pkg/tags" + "github.com/cs3org/reva/v2/pkg/utils" "github.com/owncloud/ocis/v2/ocis-pkg/log" ) @@ -34,7 +35,7 @@ func (b Basic) Extract(_ context.Context, ri *storageProvider.ResourceInfo) (Doc } if ri.Mtime != nil { - doc.Mtime = time.Unix(int64(ri.Mtime.Seconds), int64(ri.Mtime.Nanos)).UTC().Format(time.RFC3339) + doc.Mtime = utils.TSToTime(ri.Mtime).Format(time.RFC3339Nano) } return doc, nil