use chrono::{DateTime, TimeZone, Utc};
pub trait DateTimeHttp {
fn to_http_date(&self) -> String;
}
impl<Tz: TimeZone> DateTimeHttp for DateTime<Tz> {
fn to_http_date(&self) -> String {
format!(
"{} GMT",
self.with_timezone(&Utc).format("%a, %e %b %Y %H:%M:%S")
)
}
}