pub fn epoch_at_time(&self, time: &DateTime<Utc>) -> Result<ChainEpoch, TryFromIntError> {
        let difference = time.signed_duration_since(self.genesis_time);
        let epochs = (difference / EPOCH_DURATION_SECONDS as i32)
            .num_nanoseconds()
            .expect("Epoch_at_time failed");
        Ok(epochs)
    }
/// Returns the epoch at a given time
Returns the epoch at a given time
Returns the epoch at a given time
pub fn epoch_at_time(&self, time: &DateTime<Utc>) -> Result<ChainEpoch, TryFromIntError> {
        let difference = time.signed_duration_since(self.genesis_time);
        let epochs = (difference / EPOCH_DURATION_SECONDS as i32)
            .num_nanoseconds()
            .expect("Epoch_at_time failed");
        Ok(epochs)
    }
pub fn epoch_at_time ( & self , time : & DateTime < Utc > ) -> Result < ChainEpoch , TryFromIntError > { let difference = time . signed_duration_since ( self . genesis_time ) ; let epochs = ( difference / EPOCH_DURATION_SECONDS as i32 ) . num_nanoseconds ( ) . expect ( " " ) ; Ok ( epochs ) }
Returns the epoch at a given time
Returns the epoch at a given time
&self
time
&DateTime<Utc>