Closed rakuyoMo closed 4 months ago
In non-US regions, DateFormatter needs to manually set the locale to correspond to the user's device time zone, otherwise the date(from:) method may return nil.
DateFormatter
locale
date(from:)
nil
Related question: https://stackoverflow.com/questions/41206810/dateformatter-date-from-string-returns-nil
In non-US regions,
DateFormatter
needs to manually set thelocale
to correspond to the user's device time zone, otherwise thedate(from:)
method may returnnil
.Related question: https://stackoverflow.com/questions/41206810/dateformatter-date-from-string-returns-nil