Hi, I was reading through the IC codebase and noticed what looks like an off-by-one bug in rs/nervous_system/proto/src/lib.rs:
pub fn from_hh_mm(hh: u64, mm: u64) -> Result<Self, String> {
if hh >= 23 || mm >= 60 { // ← should this be >= 24?
return Err(format!("invalid time of day ({hh}:{mm})"));
}
}
Valid hours are 0–23, so hh >= 23 rejects hour 23 (11 PM UTC) as invalid. This means any SNS governance proposal scheduled at 23:xx UTC would fail.
Was this intentional, or is it a typo? Happy to submit a PR if it’s a bug.