US President Donald Trump signed an extension just before midnight in Beijing, when the pause was to expire.