If my visa expires today June 6th and I book a flight for 12:50 am tomorrow (pass through immigrations before midnight), did I overstay or still safe?
TLDR : Answer Summary
If your visa expires on June 6th and you have a flight scheduled for 12:50 am on June 7th, you should be safe from overstaying as long as you pass through immigration before midnight. Generally, if you overstay for less than 24 hours, Thai immigration officers are known to waive fines and might simply stamp your passport to indicate the overstay is under 24 hours. However, experiences may vary depending on the officer you encounter.