President Obama urged all nations to act against climate change, warning that time was running out.