How long does a territory has to be part of a country for you to recognise it?

If I look at a world map from "millenia" ago, or even just 1683 then by your logic most of the world's countries are built on a "weak basis", often even weaker than that...

We all now the tricky political situation of Taiwan but sometimes some people seem to lose all sense of basic reality and facts about it.

You have missed my point.

This is not the case of a territory that a country controls now, even if it has occupied it only recently (e.g. like Tibet), when nobody can contest that they are not the owners of the territory, unless they would be willing to attack them, to change the current ownership of the territory by force.

This is the case of a territory that is not controlled by the country that desires to be its owner, and it has not been controlled by it since 1895. Despite that, they want to change the de facto ownership of the territory, which can be done only by force. The fact that some corrupt politicians from many countries have decided that de jure Taiwan should belong to China, without any grounds for this, so that they have given to China what was not theirs to give, is something as valid as the Ribbentrop-Molotov Pact, where Hitler, despite not being the owner of Finland, Estonia, Lithuania, Latvia and Romania, has nonetheless given them to Russia, or the Churchill-Roosevelt-Stalin accords, where Churchill and Roosevelt, despite not being the owners of Eastern Europe, have given it to Stalin.

There are other such cases where a country desires to become the owner of some territory, but they at least can justify their claims by the fact that the desired territory has actually belonged to them for a long time and it had been taken from them by force, so that it would be right for the territory to have its ownership reverted.

In this case such historical claims have little value, because Taiwan has become Chinese only recently and only by force, first during the Qing dynasty and then due to the Kuomintang invasion.

Japan only controlled Taiwan from 1895 to 1945. It was Chinese territory before and it reverted to China in 1945 and has been under Chinese control ever since.

It's always fascinating the mental gymnastics people are able to do to build a fictional world that somehow fits a narrative.