You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
iOS: DateFormatter has no fixed locale, breaking non-Gregorian calendars #40
A fixed format string combined with the user's locale produces wrong output under non-Gregorian calendars. A user whose device is set to the Buddhist or Japanese calendar gets a year like 2569 in the rawValue.
This is a well-known iOS pitfall: fixed-format DateFormatter must pin its locale.
Fix: set locale = Locale(identifier: "en_US_POSIX"), or use ISO8601DateFormatter, which is what the format string is imitating.
Activity