pub fn chrono_to_zip_time(dt: &DateTime<Utc>) -> (u16, u16) {
    let year: u16 = (((dt.date().year() - 1980) << 9) & 0xFE00).try_into().unwrap();
    let month: u16 = ((dt.date().month() << 5) & 0x1E0).try_into().unwrap();
    let day: u16 = (dt.date().day() & 0x1F).try_into().unwrap();

    let hour: u16 = ((dt.time().hour() << 11) & 0x1F).try_into().unwrap();
    let min: u16 = ((dt.time().minute() << 5) & 0x7E0).try_into().unwrap();
    let second: u16 = ((dt.time().second() >> 1) & 0x1F).try_into().unwrap();

    (hour | min | second, year | month | day)
}
// Converts a `chrono` structure into a date and time stored in ZIP headers.
Converts a `chrono` structure into a date and time stored in ZIP headers.
Converts a ` chrono ` structure into a date and time stored in ZIP headers .
pub fn chrono_to_zip_time(dt: &DateTime<Utc>) -> (u16, u16) {
    let year: u16 = (((dt.date().year() - 1980) << 9) & 0xFE00).try_into().unwrap();
    let month: u16 = ((dt.date().month() << 5) & 0x1E0).try_into().unwrap();
    let day: u16 = (dt.date().day() & 0x1F).try_into().unwrap();
    let hour: u16 = ((dt.time().hour() << 11) & 0x1F).try_into().unwrap();
    let min: u16 = ((dt.time().minute() << 5) & 0x7E0).try_into().unwrap();
    let second: u16 = ((dt.time().second() >> 1) & 0x1F).try_into().unwrap();
    (hour | min | second, year | month | day)
}
pub fn chrono_to_zip_time ( dt : & DateTime < Utc > ) -> ( u16 , u16 ) { let year : u16 = ( ( ( dt . date ( ) . year ( ) - 1980 ) << 9 ) & 0xFE00 ) . try_into ( ) . unwrap ( ) ; let month : u16 = ( ( dt . date ( ) . month ( ) << 5 ) & 0x1E0 ) . try_into ( ) . unwrap ( ) ; let day : u16 = ( dt . date ( ) . day ( ) & 0x1F ) . try_into ( ) . unwrap ( ) ; let hour : u16 = ( ( dt . time ( ) . hour ( ) << 11 ) & 0x1F ) . try_into ( ) . unwrap ( ) ; let min : u16 = ( ( dt . time ( ) . minute ( ) << 5 ) & 0x7E0 ) . try_into ( ) . unwrap ( ) ; let second : u16 = ( ( dt . time ( ) . second ( ) >> 1 ) & 0x1F ) . try_into ( ) . unwrap ( ) ; ( hour | min | second , year | month | day ) }
Converts a `chrono` structure into a date and time stored in ZIP headers.
Converts a ` chrono ` structure into a date and time stored in ZIP headers .
dt
&DateTime<Utc>
dt
&DateTime<Utc>