Possible bug: GlobalTimeOfDay::from_hh_mm rejects hour 23 (11 PM UTC) as invalid

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.

Certainly looks strange. I wonder if someone can try it out and confirm the bug. @FranHefner, fancy raising an SNS proposal after 11 UTC?

cc @marc0olo

Hey guys, thanks for flagging. I forwarded the report to the team to check.

@Rachit2323 will be fixed, see https://github.com/dfinity/ic/pull/10997