In what year did the story "The Cask of Amontillado" take place?
As noted above, "The Cask of Amontillado" by Edgar Allan Poe was originally published in 1846. Although Poe himself was a nineteenth-century American writer, he deliberately chose an exotic setting (Italy) remote from his reader's lives in period and place. This use of exotic locale is typical of the "gothic" genre. A story that might seem overwrought or wildly improbable in a domestic setting becomes more credible when it describes a culture alien to its readers.
We are not given an actual date or even a time period for the story, but we do have the narrator describe himself as wearing a roquelaire (the more modern spelling is roquelaure), a type of long cloak that was worn in the 18th century. Since this is not a realistic story, it doesn't need a precise date, but both the language and atmosphere suggest that this is a work of historical fiction, set in a period before its original audience was born, for the purpose of making the story more exotic.
Thus the most precise answer we can arrive at is that it is set in the 18th century in the area that was to become Italy (the process of the unification of Italy began with the 1815 Congress of Vienna, after the period in which this story was set.)
"The Cask of Amontillado" is a short story, written by Edgar Allan Poe and first published in the Godey's Lady's Book, 33, (November, 1846) 216-218. It is a monthly magazine from Philadelphia that published poems and stories by some of the best American writers of the nineteenth century, including Nathaniel Hawthorne, Henry Wadsworth Longfellow, and Harriet Beecher Stowe. The story next appeared in the collection Poe's Works, edited by Rufus W. Griswold, Poe's literary executor, in 1850. By the time Poe wrote this story, he was already nationally known author. Like Poe's other stories, it has remained in print continuously since 1850."
We aren't given the exact year, but we can guess the time period is the eighteenth or nineteenth century based on clues in the story. Montresor's cape, vocabulary, and the torches would seem to indicate one of these centuries. Those who have traced the Montresor family name and the history of Mardi Gras have placed the murder in 1796, according to one person, and in 1787 or 1788 by another expert.