add lastmodified in req props
This commit is contained in:
6
src/utils/time.rs
Normal file
6
src/utils/time.rs
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user