We had a graduation ceremony mid June. It was 4 hours long and I had to go after one night shift and before another, attendance was mandatory. Residents who were on day services received sternly worded emails that they must be back in their 'work spaces' by 1 pm, even though the ceremony ended at 12:45. No lunch that day. They also gave us blank pieces of paper as we walked across the stage to emphasize that, ceremony or not, we had not graduated and could still be fired for any misbehavior.
We actually finished when the contracts ended at 00:00 on 01JUL, and not one second before. My last shift went until 23:00 on 30JUN, and I finished charting a few minutes before the deadline The residents at the two children's hospitals we rotated through had the same deal. However their chiefs were pretty good about making sure that anyone starting fellowship was working a day shift on the 30th, so that they could catch a the red eye out and be on time for their new job in the morning.