pub struct Timedate {
pub innards0: u32,
pub innards1: u32,
}Expand description
8 raw bytes of a Notes TIMEDATE, exactly as they appear on disk. The two u32 “Innards” are stored little-endian.
Kept as opaque bytes rather than decoded fields so the value can serve double duty as an identifier (DBID, UNID-fragment, ReplicaID) and as a clock reading without re-parsing.
Fields§
§innards0: u32Innards[0]. 1/100ths of a second since midnight UTC for clock uses; arbitrary bytes for identifier uses.
innards1: u32Innards[1]. High byte = timezone/DST flags; low 24 bits = Julian Day Number for clock uses.
Implementations§
Source§impl Timedate
impl Timedate
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, NsfError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, NsfError>
Parse from an 8-byte slice. Returns an error if the slice is shorter than 8 bytes.
Sourcepub fn as_clock(&self) -> Option<DecodedTimedate>
pub fn as_clock(&self) -> Option<DecodedTimedate>
Treat the TIMEDATE as a clock reading and decode it. Returns
None when the JDN is implausible (zero or far-future) which
usually means the TIMEDATE is actually being used as an opaque
identifier (DBID, ReplicaID).
Sourcepub fn as_hex_id(&self) -> String
pub fn as_hex_id(&self) -> String
Render as an opaque 16-hex-character identifier. Used to display DBIDs and ReplicaIDs in the operator UI.
Order is the on-disk byte order (Innards[0] little-endian bytes first, then Innards[1] little-endian bytes). This matches what the Notes client shows in File / Database / Properties.