Fans have created a timeline of the Harry Potter series from a single piece of information in Harry Potter and the Chamber of Secrets. At Nearly Headless Nick's deathday party in that book, his death is stated to have been on 31 October, 1492. Since the celebration was commemorating the five-hundredth anniversary of Nick's death, this seems to say the scene takes place on 31 October, 1992. This timeline is reinforced in Harry Potter and the Deathly Hallows when the graves of James and Lily Potter confirm that they were born in 1960 and died on 31 October 1981, further reinforced in Pottermore when the Death Eater riot on the Quidditch World Cup is stated to have taken place in 1994, and further yet in Harry Potter and the Cursed Child, in which the Triwizard Tournament is mentioned to have taken place in the 1994-1995 school year. On 1 September, 2017, J. K. Rowling confirmed, via her Twitter account that that was the day the Epilogue was set.
For the sake of convenience, this dating system will be used by the Harry Potter Wiki for all Harry Potter articles.
B.C. to 19th century
There are numerous contradictions in the timeline, though it should be noted that, in the FAQ section of her website, Rowling has admitted having difficulty with managing mathematics, so perhaps perfect internal consistency is not to be expected. In addition, considering the Harry Potter universe is a fantasy world, it's possible that certain dates may differ between it and the "real world".
Despite its problems, this timeline is extensively used by fans and Warner Bros.'s timeline of the series (featured on the DVDs for Harry Potter and the Chamber of Secrets and Harry Potter and the Prisoner of Azkaban) contains dates that were interpolated from this dating system (such as Harry's birthday being on 31 July 1980 and his first defeat of Lord Voldemort being on 31 October 1981.) However, several anachronisms have crept through in the movies, such as featuring the destruction of the Millennium Bridge in the film version of Harry Potter and the Half-Blood Prince, even though the novel (and the film) are supposed to take place two years before the bridge was built. In Harry Potter and the Order of the Phoenix, the Dursleys are seen to have a flat-screen television, which were not commonly available in the mid-1990s. In addition the Dursley's car, shown in the same film, bears a 2006 year registration plate.
A short film with the movie series cast, The Queen's Handbag, was produced in 2006 as part of the 80th birthday celebrations for Queen Elizabeth II. The skit violates the dating convention by having the characters reference the event, even though for them it should still be the mid-1990s.
Problems with time
Often when dates are given, they are given with a day of the week that does not match with that date as it in actual history. One such example occurs in Harry Potter and the Prisoner of Azkaban when Sybill Trelawney refers to 16 October as Friday, although 16 October 1993 was a Saturday. This is usually explained as artistic licence on the author's part.
There are also contradictions within the books in this area. For example, in Harry Potter and the Goblet of Fire, both 1 September and 2 September are given as Mondays and, in Harry Potter and the Prisoner of Azkaban, Buckbeak's trial is set on 20 April, but careful parsing of the text reveals that it could have happened no later than February.
Also, in Harry Potter and the Goblet of Fire it is said that the Champions were chosen on Saturday 31 October, but 31 October was a Monday in 1994. However, it was later stated that 22 November was a Tuesday, which it was in 1994.
Although the series, according to the timeline derived from the Chamber of Secrets reference, is set in the nineties, the series often seems as though it is set in the late nineties to mid-2000s, roughly concurrent with the publication of the books. In Harry Potter and the Half-Blood Prince, Cornelius Fudge uses a male pronoun to refer to the "predecessor" of the Prime Minister of the United Kingdom. According to the above timeline, this should occur in the summer of 1996, when the Prime Minister was John Major, whose immediate predecessor was a woman (Margaret Thatcher).
It is possible, however unlikely, that Fudge could be referring to a more distant predecessor, as Thatcher took office before Fudge supposedly became Minister for Magic. (Although one could imagine a scenario in which Fudge was delegated by the Minister for Magic to meet with the Prime Minister while he, Fudge, was in an inferior office.) Additionally, the personality and history of the Prime Minister portrayed appears to more closely match that of Tony Blair than of John Major. An article in the Daily Mail notes that Rowling is close to the then-Chancellor of the Exchequer Gordon Brown (often viewed as a rival to Blair's leadership of the Labour Party, who succeeded him and became Prime Minister), and that she might have been attempting to show Blair's worst side. If the books were set in sync with publication date of Philosopher's Stone, then this event would occur in 2002 (after Blair became Prime Minister).
A similar problem involves Nicolas Flamel, who was mentioned as being 665 at the time of the first book, but Nicolas Flamel was a real historical figure and would not have reached that age until 1996, around the time the first book was published. The rebuttal for this is that the date the "real" Nicolas Flamel was born does not correspond with the Nicolas Flamel of Harry Potter.
Another problem exists regarding Rubeus Hagrid's tenure as Hogwarts's gamekeeper. It is implied throughout the series that Hagrid was given that position within a few years of his expulsion from school in 1942. But in one scene of Harry Potter and the Goblet of Fire, Molly Weasley reminisces about Ogg, Hagrid's predecessor; since Hagrid's years as gamekeeper appear to overlap with Molly's years at school, it seems unlikely that she remembers a previous gamekeeper. However, it is possible that Hagrid did not become a gamekeeper immediately after being expelled, but rather started as Ogg's assistant. This is plausible given that when Harry thinks that he will be expelled for flying on the broomstick without permission in his first year, he wonders if he would be allowed to stay on as Hagrid's assistant.
There is at least one anachronism in the books. In a letter Harry writes to Sirius in Harry Potter and the Goblet of Fire, he mentions that his cousin Dudley owns a PlayStation. According to the timeline, this would be in the summer of 1994, but that sort of gaming console was not launched anywhere until December 1994, and then only in Japan. However, considering his parents gave him whatever he wanted, they could have gone out of Britain to get it, as well as use special connections. Or, Harry might have confused the PlayStation with a similar console. As most wizards are ignorant of how Muggle technology functions, the latter theory seems plausible, although Muggle-raised wizards knew much more about Muggles than the average wizard.
Another mistake occurs in dealing with the attendance of Bellatrix Lestrange and Severus Snape at Hogwarts. Sirius Black mentions Snape and Bellatrix's attendance of the school overlapping at a certain point; however, this is impossible, as Bellatrix attended the school from either 1962 to 1969 or 1963 to 1970, while Snape started at Hogwarts in 1971. Sirius could have meant that Snape and Bellatrix ran with the same crowd, but at different times, or the same manner of people, or maybe Bellatrix had to repeat at least one year.
Another contradiction is that Merlin could not have both been in King Arthur's court and have attended Hogwarts, as King Arthur ruled from late 5th century to early 6th century, but Hogwarts was founded c. 993 AD, approximately five centuries after King Arthur's reign. When Hogwarts was founded, the King of England was Æthelred II (c. 968- 1016), and the King of Scotland was most likely Kenneth II (971-995), or, less likely, Constantine III (995–997). Also if one assumes that King Arthur was born after Merlin in the Harry Potter Universe, then it leaves no period of time for Arthur to reign as the king of Britain during the 10th-15th centuries (the time periods that Merlin could have been born and lived in if he went to Hogwarts and still be living in the Middle Ages) as the kings of Britain in these time periods are well documented. One explanation for these contradictions is that King Arthur could have been born and reigned in the 5th or 6th century and Merlin could have used a Time Turner to travel back to that time period and become a member of King Arthur's Court and the Merlin of the Arthurian Legends.
If the canonical timeline of the books (1991–1997) is correct, there are several anachronisms in the films. Perhaps most glaringly is that at the start of Harry Potter and the Order of the Phoenix (set in 1995 according to the timeline), when Harry is bringing Dudley home, a February 2005 numberplate is clearly visible in the background; and then when Harry is flying down the Thames toward his trial, he flies past the Canary Wharf development (in 1995, only One Canada Square had been completed) and the London Eye (not built until 1999).