Originally Posted by
ThreeJulietTango
When the parking brake is set upon arrival at the gate.
You're correct for the USA (and, I expect, AA operations).
For other situations flying on an EU carrier or to the EU, the arrival time for the purposes of EC261/2004 delay compensation is when the aircraft door opens
Airlines have tried to avoid their compensation obligations by claiming the arrival time as when the aircraft parked or landed (before the compensation threshold) but then taking a long time to move to a gate and open the door (opening the door after the compensation threshold). This is useful to know when considering a claim for delay compensation in the EU and has been tested in court.