Ivan Valkou 5 лет назад
Родитель
Сommit
90ae34da2e
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      FreeAPS/Sources/Helpers/JSON.swift

+ 1 - 1
FreeAPS/Sources/Helpers/JSON.swift

@@ -34,12 +34,12 @@ extension Bool: JSON {}
 extension Date: JSON {
     var string: String {
         let formatter = ISO8601DateFormatter()
-        formatter.formatOptions = [.withColonSeparatorInTimeZone]
         return formatter.string(from: self)
     }
 
     init?(from: String) {
         let dateFormatter = ISO8601DateFormatter()
+        dateFormatter.formatOptions.insert(.withFractionalSeconds)
         let string = from.replacingOccurrences(of: "\"", with: "")
         if let date = dateFormatter.date(from: string) {
             self = date