Skip to content

Commit 68d795e

Browse files
authored
Fix an JSON encoding bug for dates. (#6)
1 parent b91d21d commit 68d795e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Sources/WalletOrders/OrderBuilder.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public struct OrderBuilder: Sendable {
4040
self.pemPrivateKey = pemPrivateKey
4141
self.pemPrivateKeyPassword = pemPrivateKeyPassword
4242
self.openSSLURL = URL(filePath: openSSLPath)
43+
self.encoder.dateEncodingStrategy = .iso8601
4344
}
4445

4546
private func signature(for manifest: Data) throws -> Data {

Sources/WalletPasses/PassBuilder.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public struct PassBuilder: Sendable {
4040
self.pemPrivateKey = pemPrivateKey
4141
self.pemPrivateKeyPassword = pemPrivateKeyPassword
4242
self.openSSLURL = URL(filePath: openSSLPath)
43+
self.encoder.dateEncodingStrategy = .iso8601
4344
}
4445

4546
/// Generates a signature for a given personalization token.

0 commit comments

Comments
 (0)