mirror of
https://github.com/rclone/rclone
synced 2024-11-12 10:50:08 +01:00
webdav: parse time in alternate format for mydrive.ch - fixes #1952
This commit is contained in:
parent
b412c745a1
commit
ef89f1f1a7
@ -11,6 +11,8 @@ import (
|
||||
const (
|
||||
// Wed, 27 Sep 2017 14:28:34 GMT
|
||||
timeFormat = time.RFC1123
|
||||
// Fri, 05 Jan 2018 14:14:38 +0000 (as used by mydrive.ch)
|
||||
timeFormatZ = time.RFC1123Z
|
||||
)
|
||||
|
||||
// Multistatus contains responses returned from an HTTP 207 return code
|
||||
@ -140,7 +142,10 @@ func (t *Time) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
|
||||
}
|
||||
newT, err := time.Parse(timeFormat, v)
|
||||
if err != nil {
|
||||
return err
|
||||
newT, err = time.Parse(timeFormatZ, v)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
*t = Time(newT)
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user