Never put a time limit on your doomsday predictions.

This rookie error has been the undoing of charlatans, cultists and false prophets through the ages, from Martin of Tours, who predicted that the world would end by 400, to Harold Camping, who claimed it would happen on Sept. 6, 1994.

The latest poor saps to join the oops club are the authorities in charge of Montana’s Glacier National Park. For years they’ve been warning on their visitor signs that their main attraction, the glaciers, would be “gone by 2020.” Instead, it’s those misleading signs that have had to go, because 2020 has now arrived and those pesky glaciers, all 29 of them, remain stubbornly unmelted by climate change.

You can tell that the National Park Service is secretly embarrassed because it has been trying to replace the signs by stealth. It began doing so last year but was rumbled by a visitor, Roger Roots, who reported the skullduggery at the website Watts Up With That?

Glacier National Park recently confirmed the changes to CNN but is maintaining a defiant public face. Its signs will now say: “When they [the glaciers] will completely disappear depends on how and when we act. One thing is consistent: The glaciers in the park are shrinking.”

But in truth the new signs are no more accurate than the old ones. First, some of the glaciers have expanded, not shrunk, in the last decade.

Second, “how and when we act” will not make much difference to the world’s glaciers. They have been retreating since 1820 — long before the 20th-century explosion in man-made CO2 emissions. This strongly suggests that glacial retreat is the result of natural causes — the end of the Little Ice Age — rather than of so-called “anthropogenic global warming.”

The National Park Service is not the only institution to have been caught out by the failure of “man-made climate change” to accord with the alarmists’ predicted time schedules. Also left red-faced this year was the Pentagon, which in 2004 warned that by 2020, major European cities would be under water, Britain would experience a “Siberian” climate and the world would be on the brink of famine and anarchy — all because of our old friend “climate change.”

Spectacularly wrong forecasting, of course, is nothing new. In 1968 Paul Ehrlich warned in his bestseller “The Population Bomb” that by the end of the ’70s “hundreds of millions of people” would have starved to death. This didn’t happen. Nor did he do any better with his famous wager with economics professor Julian Simon about the scarce resources that would dwindle to dangerously depleted levels by 1990. Ehrlich lost.

Plenty of green (or proto-green) and other doomsday predictors — have been proved similarly wrong through the ages: from third-century Carthaginian priest Tertullian and 18th-century economist Thomas Malthus (both of whom predicted population growth would outstrip the planet’s ability to feed humanity) to Rachel Carson (who warned of a cancer epidemic due to pesticides); from Peter Wadhams, the Cambridge professor who predicted summer Arctic ice would be gone by 2015 (it’s still there) to the Prince of Wales, who warned in 2009 that there were just “100 months” to save the world from climate change (but then had to extend the deadline, Harold Camping-style, when doomsday failed to materialize).

Given all this, you might be tempted to wonder why any of the supposed experts predicting imminent environmental catastrophe still get taken seriously. Part of the reason, I suspect, is that the mainstream media has an insatiable appetite for doomsday predictions (however ridiculous) — and less enthusiasm for stories about how we’re all doing pretty OK.

Mainly, though, it’s because we’re living through an era of green groupthink when even institutions that ought to know better have been overwhelmed by enviro-doom scare narrative. Perhaps, after so many embarrassments, 2020 will be the year the tide finally turns.

James Delingpole is executive editor of Breitbart London and host of “The Delingpod” podcast.