Masik Shivaratri and the nishitha rule
Masik Shivaratri is kept on the night chaturdashi covers nishitha, the middle muhurta of the night; if it covers both nights, the later one.
Nishitha is the middle muhurta of the night. In the calculation used here, the interval from sunset to the next sunrise is divided into fifteen equal parts; the eighth is nishitha. Its clock time depends on the location and date.
The rule
The chaturdashi present during nishitha determines the observance. When it covers nishitha on two consecutive nights, the stated rule selects the later night.
Reading a daily panchangam
The tithi shown at sunrise may change before nishitha, so a daily panchangam's sunrise tithi does not by itself give the Shivaratri night; the chaturdashi's times against the midnight muhurta do.
The same principle of using the observance's relevant period applies to Pradosham after sunset and Sankashti at moonrise.