From 8f07a22ec2adc2335b4a4cb75b408c8c93d86208 Mon Sep 17 00:00:00 2001 From: alexchornyi <85160203+alexchornyi@users.noreply.github.com> Date: Tue, 27 Jul 2021 09:22:13 +0300 Subject: [PATCH] fixed time with timezone (#40) Co-authored-by: Alexandr Chernyy --- Sources/CertLogic/Date+.swift | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Sources/CertLogic/Date+.swift b/Sources/CertLogic/Date+.swift index a75dd01..b86d10b 100644 --- a/Sources/CertLogic/Date+.swift +++ b/Sources/CertLogic/Date+.swift @@ -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) }