Time difference in iPhone Weather app

My Weather beach app displays the time according to the country in the weather link under iOS 17 but not under IOS 18

NSTimeZone.resetSystemTimeZone() is no longer supported by IOS 18 or it is a bug

Answered by DTS Engineer in 808851022

I can’t really speak to the WeatherKit side of this, but I wanted to respond to this:

NSTimeZone.resetSystemTimeZone() is no longer supported by IOS 18 or it is a bug

What are you expecting resetSystemTimeZone() to do here? It’s not something that apps should normally call. Both the system and apps have better ways to stay in sync with the current time zone. That is, for example, why there’s no Swift equivalent to this routine (there’s no TimeZone.resetSystemTimeZone()).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

I can’t really speak to the WeatherKit side of this, but I wanted to respond to this:

NSTimeZone.resetSystemTimeZone() is no longer supported by IOS 18 or it is a bug

What are you expecting resetSystemTimeZone() to do here? It’s not something that apps should normally call. Both the system and apps have better ways to stay in sync with the current time zone. That is, for example, why there’s no Swift equivalent to this routine (there’s no TimeZone.resetSystemTimeZone()).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

hello, in fact in my weather application (Weather Beach) developed with Weatherkit when you click on the weather of a beach in a country the time adapts to the country's time zone because I use TimeZone.resetSystemTimeZone() to clear the phone's cache which is not necessarily in the same time zone. it worked very well since then but under IOS 18 it no longer works.

Kind regards.

So can you give me a step-by-step description of the scenario where resetSystemTimeZone() used to help?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hello, when I click on a beach of a country the application uses resetSystemTimeZone() so that the weather adapts to the time zone of the country and not the time zone of the iPhone. Each time I click on a beach of a different country the application uses resetSystemTimeZone(). The application has always worked well except under IOS 18 the application remains on the time zone of the phone.

Kind regards

Time difference in iPhone Weather app
 
 
Q