still making sure the move to the next day is take care of. var change

also made sure that function behaves as expected in areas from 12:00 am
to 1:am