A good party, as far as I knew so far, starts some time in the evening and lasts for many hours. Typically, if guests leave early in the morning that's a strong indicator that the party has been really good. Taking a fairly typical example, our farewell party the weekend before moving over to the US took place at our home. People were invited to show up between 7 and 8pm, and the last guests left well after midnight.
You can imagine that I was surprised when I got the first invitations to people's homes and along with the invitation the note that the party would last from 6 to 9pm. Not being used to this specificity for the end of an invitation, we just ignored the declared end of 9pm. We did not leave much after that time though when we noticed some unrest in our hosts and clear signs that they were tired.
A couple of invitations later, I know better. You are supposed to have left by the time specified. Depending on how close you are to the people inviting you, staying longer can be read as misbehaving.
Recently, we invited some good friends over to our place. We just told them to show up at around 4pm on a Saturday afternoon. To my surprise, the friend sent an Email a little bit later declaring that they would be leaving at 7pm. I sure did not pay much attention to it. As it happens, the get-together evolved into a nice conversation over some food, and time flies in such moments. When one of our friends looked at his watch, it was close to 8pm. They obviously meant it very seriously when they apologized to us for "overstaying so much" and left shortly thereafter.