For D3 Cell

=IF(B3=C3,TIME(23,59,0)-$B3+TIME(0,1,0)+$C3,MOD($C3-$B3,1))
drag down