fn decode_time(&mut self) -> Result<Time> {
        let hour = self.read_u32_le()?;
        let nanoseconds = 1000 * self.read_u32_le()?;
        let year = i32::from(self.read_u16_le()?);
        let buf = self.read_bytes(4)?;
        let (month, day, minute, second) = (
            u32::from(buf[0]),
            u32::from(buf[1]),
            u32::from(buf[2]),
            u32::from(buf[3]),
        );
        let _ = self.read_u16();
        let buf = self.read_bytes(2)?;
        let (tp, fsp) = (
            FieldTypeTp::from_u8(buf[0]).unwrap_or(FieldTypeTp::Unspecified),
            buf[1],
        );
        let _ = self.read_u16();
        let tz = Tz::utc(); // TODO
        if year == 0
            && month == 0
            && day == 0
            && hour == 0
            && minute == 0
            && second == 0
            && nanoseconds == 0
        {
            return Ok(zero_datetime(&tz));
        }
        let t = if tp == FieldTypeTp::Timestamp {
            let t = ymd_hms_nanos(&Utc, year, month, day, hour, minute, second, nanoseconds)?;
            tz.from_utc_datetime(&t.naive_utc())
        } else {
            ymd_hms_nanos(
                &Tz::utc(),
                year,
                month,
                day,
                hour,
                minute,
                second,
                nanoseconds,
            )?
        };
        Time::new(t, tp.try_into()?, fsp as i8)
    }
/// Decodes time encoded by `encode_time` for Chunk format.
Decodes time encoded by `encode_time` for Chunk format.
Decodes time encoded by ` encode_time ` for Chunk format .
fn decode_time(&mut self) -> Result<Time> {
        let hour = self.read_u32_le()?;
        let nanoseconds = 1000 * self.read_u32_le()?;
        let year = i32::from(self.read_u16_le()?);
        let buf = self.read_bytes(4)?;
        let (month, day, minute, second) = (
            u32::from(buf[0]),
            u32::from(buf[1]),
            u32::from(buf[2]),
            u32::from(buf[3]),
        );
        let _ = self.read_u16();
        let buf = self.read_bytes(2)?;
        let (tp, fsp) = (
            FieldTypeTp::from_u8(buf[0]).unwrap_or(FieldTypeTp::Unspecified),
            buf[1],
        );
        let _ = self.read_u16();
        let tz = Tz::utc(); // TODO
        if year == 0
            && month == 0
            && day == 0
            && hour == 0
            && minute == 0
            && second == 0
            && nanoseconds == 0
        {
            return Ok(zero_datetime(&tz));
        }
        let t = if tp == FieldTypeTp::Timestamp {
            let t = ymd_hms_nanos(&Utc, year, month, day, hour, minute, second, nanoseconds)?;
            tz.from_utc_datetime(&t.naive_utc())
        } else {
            ymd_hms_nanos(
                &Tz::utc(),
                year,
                month,
                day,
                hour,
                minute,
                second,
                nanoseconds,
            )?
        };
        Time::new(t, tp.try_into()?, fsp as i8)
    }
fn decode_time ( & mut self ) -> Result < Time > { let hour = self . read_u32_le ( ) ? ; let nanoseconds = 1000 * self . read_u32_le ( ) ? ; let year = i32 :: from ( self . read_u16_le ( ) ? ) ; let buf = self . read_bytes ( 4 ) ? ; let ( month , day , minute , second ) = ( u32 :: from ( buf [ 0 ] ) , u32 :: from ( buf [ 1 ] ) , u32 :: from ( buf [ 2 ] ) , u32 :: from ( buf [ 3 ] ) , ) ; let _ = self . read_u16 ( ) ; let buf = self . read_bytes ( 2 ) ? ; let ( tp , fsp ) = ( FieldTypeTp :: from_u8 ( buf [ 0 ] ) . unwrap_or ( FieldTypeTp :: Unspecified ) , buf [ 1 ] , ) ; let _ = self . read_u16 ( ) ; let tz = Tz :: utc ( ) ; // TODO if year == 0 && month == 0 && day == 0 && hour == 0 && minute == 0 && second == 0 && nanoseconds == 0 { return Ok ( zero_datetime ( & tz ) ) ; } let t = if tp == FieldTypeTp :: Timestamp { let t = ymd_hms_nanos ( & Utc , year , month , day , hour , minute , second , nanoseconds ) ? ; tz . from_utc_datetime ( & t . naive_utc ( ) ) } else { ymd_hms_nanos ( & Tz :: utc ( ) , year , month , day , hour , minute , second , nanoseconds , ) ? } ; Time :: new ( t , tp . try_into ( ) ? , fsp as i8 ) }
Decodes time encoded by `encode_time` for Chunk format.
Decodes time encoded by ` encode_time ` for Chunk format .
&mut self
&mut self