about summary refs log tree commit diff
path: root/patches/expo-updates+0.28.14.patch
blob: 6fc4fc5fcf8d39ae139ffd27545f40ce368cd82b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/node_modules/expo-updates/ios/EXUpdates/Update/ExpoUpdatesUpdate.swift b/node_modules/expo-updates/ios/EXUpdates/Update/ExpoUpdatesUpdate.swift
index b85291e..546709d 100644
--- a/node_modules/expo-updates/ios/EXUpdates/Update/ExpoUpdatesUpdate.swift
+++ b/node_modules/expo-updates/ios/EXUpdates/Update/ExpoUpdatesUpdate.swift
@@ -78,13 +78,20 @@ public final class ExpoUpdatesUpdate: Update {
       status = UpdateStatus.StatusPending
     }
 
+    // Instead of relying on various hacks to get the correct format for the specific
+    // platform on the backend, we can just add this little patch..
+    let dateFormatter = DateFormatter()
+    dateFormatter.locale = Locale(identifier: "en_US_POSIX")
+    dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"
+    let date = dateFormatter.date(from:commitTime) ?? RCTConvert.nsDate(commitTime)!
+
     return Update(
       manifest: manifest,
       config: config,
       database: database,
       updateId: uuid,
       scopeKey: config.scopeKey,
-      commitTime: RCTConvert.nsDate(commitTime),
+      commitTime: date,
       runtimeVersion: runtimeVersion,
       keep: true,
       status: status,