GOSLAR, Germany — On March 26, 1930, four roofers in this small west German town inscribed a message to the future. “Difficult times of war lie behind us,” they wrote. After describing the soaring inflation and unemployment that followed the First World War, they concluded, “We hope for better times soon to come.”

The roofers rolled the message into a clear glass bottle and hid it in the roof of the town’s 12th-century cathedral. Then they patched the roof’s only opening back up.

Eighty-eight years later, while doing maintenance work, 52-year-old roofer Peter Brandt happened upon the bottle. He recognized the letterhead of the receipt paper on which the note was written, as well as the name of one of the signatories. Willi Brandt, a shy 18-year-old roofing apprentice at the time of the note’s creation, was his grandfather.

“It was an exciting find,” Peter Brandt said, given the improbability of discovering the bottle in the same roof his grandfather repaired almost a century earlier. The letter, Brandt said, is from a much darker chapter of Germany’s past. But its discovery offered an opportunity to reflect on the relative peace and prosperity of the present, even if the day’s headlines paint a dire picture.

He has memorized one of the message’s lines in particular: “We worked an entire week for 1 pound of butter and 1 bread,” wrote his grandfather and his colleagues in 1930.

“It’s shocking when you think about the country we live in today and all the things we can afford now,” he said. “They were already living in difficult times. But the war made everything even worse.”

Just a few years after his grandfather — who is not related to onetime West German chancellor Willy Brandt — signed the note, he enlisted as a soldier during World War II and was captured and imprisoned by the Russians. After he returned to Goslar, he resumed his profession as a roofer but never talked about the war.

“When I met him, he was very reticent and closed off,” said Peter Brandt, who joined his grandfather on the roofs of the town’s buildings during his school holidays when he was 12 and would later take over the family business.

Willi Brandt would have barely recognized Goslar 88 years after signing the note: The once economically depressed mining town is now home to several chemical and metal companies, with an old town center that’s become a tourist hub and ­UNESCO World Heritage site. The unemployment problems that Willi Brandt described have largely disappeared, according to Goslar Mayor Oliver Junk.

Still, Goslar residents are also moving away to larger places to attend university or find work, said Ulrich Albers, head of the local archives. In some parts of the town, stores and entire housing blocks stand empty.

Three years ago, during the height of Germany’s refugee crisis, Junk made headlines when he proposed that Goslar take in additional refugees, citing the housing shortage in bigger cities. “It’s mad that in Göttingen they are having to build new accommodation, and are tearing their hair out as to where to put everyone, while we have empty properties and employers who are desperate for skilled workers,” Junk told the Guardian newspaper in August 2015, referencing a nearby more-populous city.

Junk said he doesn’t regret that decision — and that the contents of Willi Brandt’s letter put it in a new perspective. “Every day, we’re discussing the many problems we have as a city that are allegedly very, very difficult. But with this letter from 1930, we can see that the many problems that we perceive aren’t really problems,” he said.

The roughly 1,000 refugees the town has taken in are now going to school or fully employed by one of the town’s IT industries, pharmacies or other businesses, according to Junk.

This month, Junk, along with Goslar residents and Peter Brandt, returned the 88-year-old message to its resting place. Although the original paper from 1930 is now at the town archives, a copy and an added message from the mayor were rolled up into the bottle and placed into the roof of the 12th-century cathedral.

Peter Brandt said that if he were to write a similar letter, he’d inform the future that Goslar is experiencing peaceful times. “But in the media, you see all of these problems worldwide,” he said, “and I’d add that I do hope those will improve in the future.”

Junk hopes that in 100 years, another roofer will discover the bottle. Although he won’t reveal exactly what he wrote in his message to future Goslar residents, he said he doesn’t hope for better times. Rather, he says: “If there’s still peace then and the people are doing just as well as they are today, that’s enough.”