Skip to content

Commit

Permalink
fix: timestamp format of getlastmodified in dav xml (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyp authored Feb 22, 2024
1 parent 76ef7ba commit 1c41db0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 1c41db0

Please sign in to comment.