Skip to main content

decode_mjd_bcd

Function decode_mjd_bcd 

Source
pub fn decode_mjd_bcd(raw: [u8; 5]) -> Option<MjdBcdDateTime>
Expand description

Decode a 5-byte DVB UTC time (16-bit MJD + 24-bit BCD HHMMSS) to a plain MjdBcdDateTime.

Unlike decode_mjd_bcd_utc, this is dependency-free (no chrono feature required). Returns None if the BCD nibbles are out of range or the minute/second fields exceed 59. The MJD→calendar conversion follows ETSI EN 300 468 Annex C.