Former US president Barack Obama on Tuesday said the climate change clock is ticking and world leaders must work together to remedy the situation before it's too late.

Speaking before an enthusiastic public at a global food innovation summit in the Italian city of Milan, Obama said climate change is the challenge "that will shape the contours of this century more dramatically … than any other", Xinhua news agency reported.

"No nation, whether large or small, rich or poor, will be immune from (its) impacts," said Obama.

"This is already true in the United States," he said, where some cities are seeing "floods on sunny days", longer and more dangerous wildfire seasons, and receding shorelines and melting glaciers in Alaska.

"Even if every country stopped carbon emissions now, climate change would still have an impact on our world for years to come," he added.

Climate change is already making it more difficult to grow food, with "shrinking crop yields and spiking food prices leading in some cases to political instability."

"Men, women and children are fleeing the Middle East and sub-Saharan Africa in record numbers due to war, but also due to food shortages caused by climate change, and this situation will get worse in time," Obama warned.

He also pointed out that large-scale industrial farming is the second-largest greenhouse gas producer after fossil fuels, and according to the World Bank, may account for 70 per cent of global greenhouse emissions by 2050.

This will take leadership, public investment, and smart technological innovation to help farmers grow crops in a sustainable and efficient way, without destroying the planet in the process, Obama said.