]> OzVa Git service - ozva-cloud/commitdiff
fix: timestamp format of getlastmodified in dav xml (#366)
authortobyp <tobyp@tobyp.net>
Thu, 22 Feb 2024 00:30:01 +0000 (01:30 +0100)
committerGitHub <noreply@github.com>
Thu, 22 Feb 2024 00:30:01 +0000 (08:30 +0800)
src/server.rs

index 563cc4472810fb3df4c5f1f031151c467fb39422..d891bc6a6725f0f14614aff6c0af6b819107a296 100644 (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));