Last-ditch talks between Britain and the European Union to get a Brexit deal ahead of a summit of the bloc’s leaders this week went on past midnight to Wednesday, but it was still unclear if London could avoid postponing its departure due on Oct. 31.