EU extends Brexit deadline to Oct. 31