Skip to content

Commit

Permalink
Use built-in ISO date formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Dec 19, 2019
1 parent 607402d commit f634a37
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions MapboxCoreNavigation/Date.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ extension Date {
return Date.ISO8601Formatter.string(from: self)
}

static let ISO8601Formatter: DateFormatter = {
let formatter = DateFormatter()
formatter.locale = Locale(identifier: "en_US_POSIX")
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
static let ISO8601Formatter: ISO8601DateFormatter = {
let formatter = ISO8601DateFormatter()
formatter.formatOptions = .withInternetDateTime
formatter.timeZone = TimeZone(secondsFromGMT: 0)
return formatter
}()
Expand Down

0 comments on commit f634a37

Please sign in to comment.