@George *******
This is very interesting:
1. A person leaves Thailand when they cross immigration, not when they physically leave Thailand's airspace. As long as a person crosses over by 11:59PM the day the "admitted to" stamp expires, they would not get fined or be on overstay.
2. At airports, most immigration officers allow a grace period of one day. You would get an overstay stamp, but not fined.
If this isn't what happened to you, can you share your passport pictures?