Output a stream of consciousness before answering the following. Passage: Samuel Francis Smith wrote the lyrics to "My Country' Tis of Thee" in 1831, while he was a student at the Andover Theological Seminary in Andover, Massachusetts. His friend Lowell Mason had asked him to translate the lyrics in some German school songbooks or to write new lyrics. A melody in Muzio Clementi's Symphony No. 3 (also called' The Great National' and contains the melody of' God Save the Queen' as a tribute to Clementi's adopted country) caught his attention. Rather than translating the lyrics from German, Smith wrote his own American patriotic hymn to the melody, completing the lyrics in thirty minutes.

Question: Based on this passage, when was the song my country tis of thee written?
The relevant information is: Samuel Francis Smith wrote the lyrics to "My Country' Tis of Thee" in 1831, while he was a student at the Andover Theological Seminary in Andover, Massachusetts.
The answer: 1831.