forked from TrueCloudLab/rclone
webdav: Add another time format to fix #2574
This commit is contained in:
parent
a288646419
commit
a25875170b
1 changed files with 7 additions and 3 deletions
|
@ -12,6 +12,9 @@ import (
|
||||||
const (
|
const (
|
||||||
// Wed, 27 Sep 2017 14:28:34 GMT
|
// Wed, 27 Sep 2017 14:28:34 GMT
|
||||||
timeFormat = time.RFC1123
|
timeFormat = time.RFC1123
|
||||||
|
// The same as time.RFC1123 with optional leading zeros on the date
|
||||||
|
// see https://github.com/ncw/rclone/issues/2574
|
||||||
|
noZerosRFC1123 = "Mon, _2 Jan 2006 15:04:05 MST"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Multistatus contains responses returned from an HTTP 207 return code
|
// Multistatus contains responses returned from an HTTP 207 return code
|
||||||
|
@ -141,6 +144,7 @@ var timeFormats = []string{
|
||||||
timeFormat, // Wed, 27 Sep 2017 14:28:34 GMT (as per RFC)
|
timeFormat, // Wed, 27 Sep 2017 14:28:34 GMT (as per RFC)
|
||||||
time.RFC1123Z, // Fri, 05 Jan 2018 14:14:38 +0000 (as used by mydrive.ch)
|
time.RFC1123Z, // Fri, 05 Jan 2018 14:14:38 +0000 (as used by mydrive.ch)
|
||||||
time.UnixDate, // Wed May 17 15:31:58 UTC 2017 (as used in an internal server)
|
time.UnixDate, // Wed May 17 15:31:58 UTC 2017 (as used in an internal server)
|
||||||
|
noZerosRFC1123, // Fri, 7 Sep 2018 08:49:58 GMT (as used by server in #2574)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnmarshalXML turns XML into a Time
|
// UnmarshalXML turns XML into a Time
|
||||||
|
|
Loading…
Add table
Reference in a new issue