NSTimeZone


Alex Zavatone
 

Does anyone know when NSTimeZone changes on iOS when the GPS location of the device changes? I have tested on my device and Simulator and it appears when running in the Simulator, that NSTimeZone.local does not update when running while simulating tests. This does work on device. In the Simulator, NSTimeZone.local ignores the change and returns the non adjusted time zone. Calling a reset on it does not update the time zone to what it should be.

Has anyone seen this?

iPhone 6s Plus, iOS 12.2
Simulator iPhone 7 Plus 12.2
Xcode 10.2.1


Alex Zavatone
 

I realized that my wording was not really clear. Basically, if you are trying to simulate the location of a device in UI Tests, clicking on the options for the test scheme’s test section for each test target does properly simulate the location, but the time zone does not change at all.

This failure only happens in the iOS Simulator but works as expected on the device.

On Jul 1, 2019, at 4:18 PM, Alex Zavatone via Groups.Io <zav@...> wrote:

Does anyone know when NSTimeZone changes on iOS when the GPS location of the device changes? I have tested on my device and Simulator and it appears when running in the Simulator, that NSTimeZone.local does not update when running while simulating tests. This does work on device. In the Simulator, NSTimeZone.local ignores the change and returns the non adjusted time zone. Calling a reset on it does not update the time zone to what it should be.

Has anyone seen this?

iPhone 6s Plus, iOS 12.2
Simulator iPhone 7 Plus 12.2
Xcode 10.2.1