Skip to content

Commit

Permalink
fixed time with timezone (eu-digital-green-certificates#40)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandr Chernyy <[email protected]>
  • Loading branch information
alexchornyi and pingus-nikalex authored Jul 27, 2021
1 parent cb429cd commit 8f07a22
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Sources/CertLogic/Date+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,10 @@ extension Date {
}()

static let iso8601Formatter: ISO8601DateFormatter = {
let formatter = ISO8601DateFormatter()
formatter.formatOptions = [.withFullDate,
.withTime,
.withDashSeparatorInDate,
.withColonSeparatorInTime]
return formatter
}()
let formatter = ISO8601DateFormatter()
formatter.timeZone = TimeZone(abbreviation: "UTC")
return formatter
}()

var ISO8601String: String { return Date.iso8601Full.string(from: self) }

Expand Down

0 comments on commit 8f07a22

Please sign in to comment.