why in hot weather my car just shuts off by itself and i have restart engine aga on 1999 Acura TL

the engine shuts off if the weather is hot, why?

Asked by for the 1999 Acura TL
I have similar problem with my 99 acura TL. I think is the ignition switch.