fn offset_from_utc_datetime(&self, utc: &NaiveDateTime) -> Self::Offset {
        let timestamp = utc.timestamp();
        let timespans = self.timespans();
        let index =
            binary_search(0, timespans.len(), |i| timespans.utc_span(i).cmp(timestamp)).unwrap();
        TzOffset::new(*self, timespans.get(index))
    }
// Binary search for the required timespan. Any i64 is guaranteed to fall within
// exactly one timespan, no matter what (so the `unwrap` is safe).
Binary search for the required timespan. Any i64 is guaranteed to fall within
exactly one timespan, no matter what (so the `unwrap` is safe).
Binary search for the required timespan . Any i64 is guaranteed to fall within exactly one timespan no matter what ( so the ` unwrap ` is safe ) .
fn offset_from_utc_datetime(&self, utc: &NaiveDateTime) -> Self::Offset {
        let timestamp = utc.timestamp();
        let timespans = self.timespans();
        let index =
            binary_search(0, timespans.len(), |i| timespans.utc_span(i).cmp(timestamp)).unwrap();
        TzOffset::new(*self, timespans.get(index))
    }
fn offset_from_utc_datetime ( & self , utc : & NaiveDateTime ) -> Self :: Offset { let timestamp = utc . timestamp ( ) ; let timespans = self . timespans ( ) ; let index = binary_search ( 0 , timespans . len ( ) , | i | timespans . utc_span ( i ) . cmp ( timestamp ) ) . unwrap ( ) ; TzOffset :: new ( * self , timespans . get ( index ) ) }
Binary search for the required timespan.
Binary search for the required timespan .
&self
utc
&NaiveDateTime
&self
utc
&NaiveDateTime