According to multiple sources on the internet, that quote pre-dates Mark Twain considerably. And the quote is not socks but shoes. Shoes is what people go halfway around the world in, socks optional.
Mark Twain: "If you tell the truth you don't have to remember anything."