- With the Friend Safari
Yes, it works the same. The Ditto in the Friend Safari are guaranteed to have 2 perfect IVs though, meaning that they are a popular choice for getting "perfect" Pokemon. Otherwise they are exactly the same.
- With the GTS
Mostly the same. The only difference is if the Ditto you are using is from a different country to your own, then the baby Pokemon will have an increased chance of being Shiny. Otherwise yes, it stays the same.
So really, the minor differences there are are beneficial anyway so it is nothing to worry about.