add lastmodified in req props

This commit is contained in:
grimhilt
2023-06-17 16:41:00 +02:00
parent 1fd7948122
commit e0d4c5efac
5 changed files with 91 additions and 4 deletions

6
src/utils/time.rs Normal file
View File

@@ -0,0 +1,6 @@
use chrono::{DateTime, TimeZone, Utc, ParseError};
pub fn parse_timestamp(timestamp: &str) -> Result<DateTime<Utc>, ParseError> {
let format = "%a, %d %b %Y %H:%M:%S %Z";
Utc.datetime_from_str(timestamp, format)
}