In the US, opium and cocaine were not regulated federally until the Harrison Act of 1914. So "a century".
The first opium war started in 1839, so even in China, "not quite two centuries" is much more accurate than "centuries at least".
A good argument could be made that these substances weren't really banned in the US until the Controlled Substances Act of 1970. The word "decades" is pretty reasonable.
https://en.wikipedia.org/wiki/Opium_Wars