fix: timestamp format of getlastmodified in dav xml (#366)

This commit is contained in:
tobyp 2024-02-22 01:30:01 +01:00 committed by GitHub
parent 76ef7ba0fb
commit 1c41db0c2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1362,7 +1362,7 @@ impl PathItem {
pub fn to_dav_xml(&self, prefix: &str) -> String {
let mtime = match Utc.timestamp_millis_opt(self.mtime as i64) {
LocalResult::Single(v) => v.to_rfc2822(),
LocalResult::Single(v) => format!("{}", v.format("%a, %d %b %Y %H:%M:%S GMT")),
_ => String::new(),
};
let mut href = encode_uri(&format!("{}{}", prefix, &self.name));