webdav: add support for parsing more time formats

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2023-05-16 18:51:42 +02:00
parent 824a70b22d
commit 19da923369
3 changed files with 28 additions and 1 deletions

View File

@@ -443,7 +443,7 @@ func (f *webDavFile) Patch(patches []webdav.Proppatch) ([]webdav.Propstat, error
for _, p := range patch.Props {
if status == http.StatusForbidden && !hasError {
if !patch.Remove && util.Contains(lastModifiedProps, p.XMLName.Local) {
parsed, err := http.ParseTime(string(p.InnerXML))
parsed, err := parseTime(string(p.InnerXML))
if err != nil {
f.Connection.Log(logger.LevelWarn, "unsupported last modification time: %q, err: %v",
string(p.InnerXML), err)