Source of the Obligation to Wear Socks
Question
Answer
Shalom and blessings
It is necessary to cover the leg below the knee.
Except in places where it is customary to walk barefoot, as was the custom in the past in Eastern countries.
Therefore, the definition is not that 'in the past, women wore long dresses, so there was no need to wear socks'. Rather, in Western countries, they wore socks, [indeed they wore long dresses, but not to the extent that the leg was completely unseen].
The definition is that everything depends on local customs.
See sources.
Source
Mishnah Berurah, Siman 2, S"K 1
The Anflaot should be worn or removed also under the sheet so as not to reveal the legs, which are customarily always covered in these countries where people do not walk barefoot even in summer, and so on, unless it is impossible otherwise.