فهرست منبع

FreeAPS MS carb fix

Jon Fawcett 6 سال پیش
والد
کامیت
b34b9b37b9
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      LoopFollow/Controllers/NightScout.swift

+ 4 - 1
LoopFollow/Controllers/NightScout.swift

@@ -1106,7 +1106,10 @@ extension MainViewController {
             } else {
                 return
             }
-            let strippedZone = String(carbDate.dropLast())
+            // Fix for FreeAPS milliseconds in timestamp
+            var strippedZone = String(carbDate.dropLast())
+            strippedZone = strippedZone.components(separatedBy: ".")[0]
+            
             let dateFormatter = DateFormatter()
             dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss"
             dateFormatter.locale = Locale(identifier: "en_US")