/// Attempts to convert to a chrono UTC date time
Attempts to convert to a chrono UTC date time
Attempts to convert to a chrono UTC date time
pub fn to_datetime(&self) -> Option<DateTime<Utc>> {
        // windows timestamp resolution
        let ticks_per_second = 10_000_000;
        let secs = (self.timestamp / ticks_per_second) as i64;
        let nsecs =
            (1_000_000_000 / ticks_per_second) * ((self.timestamp * ticks_per_second) as u64);
        let epoch = Utc.ymd(1601, 1, 1).and_hms(0, 0, 0);
        match Utc.timestamp_opt(epoch.timestamp() + secs, nsecs as u32) {
            LocalResult::Single(date) => Some(date),
            _ => None,
        }
    }
pub fn to_datetime ( & self ) -> Option < DateTime < Utc > > { // windows timestamp resolution let ticks_per_second = 10_000_000 ; let secs = ( self . timestamp / ticks_per_second ) as i64 ; let nsecs = ( 1_000_000_000 / ticks_per_second ) * ( ( self . timestamp * ticks_per_second ) as u64 ) ; let epoch = Utc . ymd ( 1601 , 1 , 1 ) . and_hms ( 0 , 0 , 0 ) ; match Utc . timestamp_opt ( epoch . timestamp ( ) + secs , nsecs as u32 ) { LocalResult :: Single ( date ) => Some ( date ) , _ => None , } }
Attempts to convert to a chrono UTC date time
Attempts to convert to a chrono UTC date time
&self