There are two ways that come to mind off the top of my head. You can use 'Great Man' or Big History to deduce the answer by simply asking who the Shogun was at the time. By using reference points such as this or by asking how long ago the Battle of Sekigahara was (1600) it would be relatively easy to deduce. This would be a dead giveaway if you had access to the knowledge we have available now.
The other method you could use is to look at cultural history. Le'ts assume you don't subscribe to the Big History or Great Man perspectives of historical events and you want an accurate answer but without abusing your knowledge of the future too much.
It's quite easy really. 1628 was before the isolationist period and the closed country "Sakoku" policy. Japan wasn't reopened to Western contact until 1858. Just look around. Are there foreigners in any significant number? You're in 1628. Are their no foreigners? You're in 1828. Even if you didn't know what years the period of isolationism was, it would be easy to know. Are warriors trying to kill you the moment they see you? You're in 19th century Japan, baby.
Ok I'll answer this one more way just to try to hit it from several angles. In 1628, the ruling Samurai classes are still very much warriors with combat as a primary role of their status. In 1828, the Samurai have become bureaucrats and administrators. They all still wore swords, but by this time, many had never seen combat or even knew how to use them efficiently. The 200 years of relative peace gave the warrior classes more time to devote to philosophy and the arts. Books like the Hakakure: the book of the Samurai, are just a quick easy reference to point to, which display the Samurai ideal, a far more idealistic notion than the reality of combat. The lack of combat is precisely what led to this kind of romanticization of what it means to serve as a Samurai retainer. In periods of war martial arts in Japan, as far as the textual record shows, are far more focused on practicality than idealism. The opposite is true for books focusing on the spirituality of Zen and the meaning of Bushido (a term not to be used till later centuries, and popularized by Nitobe 's nationalist love letter to reactionaries who would start Japan's decent into empire). Those books were mostly written in times of relative peace. Musashi's book of five rings was written well into the 17th century, after all the fighting had died down. Takuan Soho, Yagyu Morinori, and the Hagakure were all written during this peace time and focus on the romanticization of the Samurai and fighting, rather than actual fighting (Musashi's book of five rings is kind of the of that era and the start of the peace times, but very roughly.)
Source: Master's in Asian Studies and in the process of writing my Thesis on the historical relationship between Zen and the Martial Arts. Wrote this quickly so I'm sure I've overstated some things and am probably wrong on others but feel free to disabuse me of my mistakes. :-) Have a good one.
Japan is such a large country that depending where you went you could get a totally different answer. For simplicity sake, I'm going to assume you're talking about visiting Edo/Tokyo.
Simply put, if you were visiting Edo in 1820 vs. 1620, Edo had grown immensly in size. While in the early 1600s, Kyoto was still the political, administrative, and cultural capital of Japan, after the transfer of the Shogunate's residence to Edo (where the Tokugawa family's power base was) the administrative and cultural center shifted as well. It also didn't hurt that the Bakufu (the Shogunate government) mandated the policy of sankin kotai, which was a white elephantesque policy that forced various daimyo from all over Japan to maintain a residence and pay homage to the Shogun routinely. All of this led to increased trade and immigration to the Kanto region, which had previously been more of a sleepy backwater compared to Kyoto. For that matter, the Shogunate's palace, Edo castle, had been greatly expanded between 1620 and 1820 as well. A significant amount of land that the palace occupied had been beach or unusable, and a massive land reclamation project. In addition, most of the city you would have seen in 1620 would have been burned down during the Great Meireki Fire. It would have been rebuilt, too: Edo was likely the world's largest city by the 1700s. Quite a transformation from the sleepy backwater it was before.
Source: Mason, A History of Japan
Loudly proclaim the word of Jesus, which was still legal in 1628.
Or just be an obviously foreign person, and see if the authorities come after you. By 1828 the law against foreigners roaming freely was well established, and shipwrecked western sailors were quickly apprehended and deported. When Ranald Macdonald went to Japan in 1848, he landed in a small Ainu village in Hokkaido but he was still taken to a magistrate and sent to Nagasaki to be deported on a western ship.
With enough information about the position of the stars and planets you could figure it out. Or you could ask about Halley's Comet, which appeared in 1758/59.