Post

Replies

Boosts

Views

Activity

DateFormatter date(from:) returns nil for date 2026-03-29 in Atlantic/Azores timezone
When using DateFormatter with the Atlantic/Azores timezone, calling date(from: formattedString) for the date 2026-03-29 returns nil unexpectedly. codes: let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyyMMdd" // 年月日格式 dateFormatter.timeZone = TimeZone(identifier: "Atlantic/Azores") dateFormatter.locale = Locale(identifier: "en_US_POSIX") var now = Date() now -= 60 * 60 * 13 let formattedString = dateFormatter.string(from: now) let dateWithTimeZone = dateFormatter.date(from: formattedString) print(formattedString) //20260329 print(dateWithTimeZone) // nil
0
0
37
7h
DateFormatter date(from:) returns nil for date 2026-03-29 in Atlantic/Azores timezone
When using DateFormatter with the Atlantic/Azores timezone, calling date(from: formattedString) for the date 2026-03-29 returns nil unexpectedly. codes: let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyyMMdd" // 年月日格式 dateFormatter.timeZone = TimeZone(identifier: "Atlantic/Azores") dateFormatter.locale = Locale(identifier: "en_US_POSIX") var now = Date() now -= 60 * 60 * 13 let formattedString = dateFormatter.string(from: now) let dateWithTimeZone = dateFormatter.date(from: formattedString) print(formattedString) //20260329 print(dateWithTimeZone) // nil
Replies
0
Boosts
0
Views
37
Activity
7h
The values stored in NSUserdefault still exist after resinatll the app!!!
The problem only happened on iOS system is 18.3. We save the data about user after user login,so when user login successful ,we save users info in NSUserdefault ,then user delete app,and reinstall the app,when launch the app,it is already logged in.
Replies
1
Boosts
0
Views
388
Activity
Feb ’25