My iOS swift application calls
TimeZone.current
when the application comes to the foreground. If I manually change the timezone from Settings->General->Date&Time, and then bring my application to the foreground, I get the correct timezone. But if my timezone setting was set to automatic, and then I turn off the automatic, and bring back my application to the foreground, the TimeZone.current
API does not reflect the new system timezone!
If I put the application to background and come back again to the foreground, this time it reflects the proper system timezone. Is this a bug in iOS SDK? Is there a workaround for this?