The United States and China on Saturday announced a ceasefire in their tariffs war, hours after US President Donald Trump upended another international forum by snubbing G20 action on trade disputes and climate change.