Assuming the reason for two days Yom Tov is because messengers could not reach those places in time to tell them the days of Rosh Chodesh, why is it that if someone visits Israel, but doesn't plan on staying there, they are required to keep two days Yom Tov? Following the logic above, once they are in the new location (e.g. Israel), they will surely know the correct dates for Yom Tov.
[my question also applies to the reverse case of someone from Israel visitng Chutz La'aretz]