I want to get the correct timezone even if I change the timezone in my device.
Currently I get the timezone by calling the following line:
[[NSTimeZone localTimeZone] name]
But if I change my device's timezone then I get this timezone instead of the current timezone.
Basically you can't. If the user "lies" by setting a different timezone for their iOS device, then every API that you call will make use of that timezone.
The only possible solution is to get the user's current location and to lookup the timezone based on that location. This requires Internet access to call some 3rd party API that provides this information and of course it requires the user to grant permission for your app to access their location.