mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 12:19:37 -06:00
fix: fix date formatting
This commit is contained in:
@@ -7,5 +7,7 @@ const (
|
||||
ContextKeyPath
|
||||
|
||||
// RFC1123 time that mimics oc10. time.RFC1123 would end in "UTC", see https://github.com/golang/go/issues/13781
|
||||
// Format copied from internal package https://github.com/cs3org/reva/blob/edge/internal/http/services/owncloud/ocdav/net/net.go.
|
||||
// It's needed to match the times shown in PROPFIND and REPORT requests.
|
||||
RFC1123 = "Mon, 02 Jan 2006 15:04:05 GMT"
|
||||
)
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
|
||||
merrors "go-micro.dev/v4/errors"
|
||||
@@ -21,6 +20,7 @@ import (
|
||||
"github.com/cs3org/reva/v2/pkg/utils"
|
||||
searchmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/search/v0"
|
||||
searchsvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/search/v0"
|
||||
"github.com/owncloud/ocis/v2/services/webdav/pkg/constants"
|
||||
"github.com/owncloud/ocis/v2/services/webdav/pkg/net"
|
||||
"github.com/owncloud/ocis/v2/services/webdav/pkg/prop"
|
||||
"github.com/owncloud/ocis/v2/services/webdav/pkg/propfind"
|
||||
@@ -192,7 +192,7 @@ func matchToPropResponse(ctx context.Context, match *searchmsg.Match) (*propfind
|
||||
})))
|
||||
}
|
||||
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:name", match.Entity.Name))
|
||||
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("d:getlastmodified", match.Entity.LastModifiedTime.AsTime().Format(time.RFC1123)))
|
||||
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("d:getlastmodified", match.Entity.LastModifiedTime.AsTime().Format(constants.RFC1123)))
|
||||
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("d:getcontenttype", match.Entity.MimeType))
|
||||
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:permissions", match.Entity.Permissions))
|
||||
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:highlights", match.Entity.Highlights))
|
||||
|
||||
Reference in New Issue
Block a user