Most people would probably assume that food from over a hundred years ago would certainly be other than safe to eat, but that may not be the case for certain canned foods.
In 1974, a batch of canned freeze-dried foods were discovered aboard the wreck of a steamboat that sank in the Missouri River in 1865. The National Food Processors Association performed various tests to check the levels of microbial growth and nutritional value of the food. They discovered that there was no trace of microbial growth, and subsequently safe to eat.
The vitamin content had degraded and the smell was off from what it originally was, but they determined the 109-year-old food to still be safely edible.
Typically, certain canned foods, such as those that are freeze-dried, can last up to thirty years. The advertised shelf life of most canned foods is one to five years.
The canning of food was introduced during the Napoleonic Wars after the French advertised a reward of 12,000 francs to whoever could produce a method of effectively preserving food for long durations. Demand for canned food hit a peak during World War 1, when soldiers were in far-away lands, bound by trenches in undesirable conditions.
Below is a video of a man who eats various food from a Korean war ration. The peanut butter was found to be in remarkable condition and flavor.