Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Timestamp encoding and decoding #674

Merged
merged 7 commits into from
Nov 4, 2022
Merged
Next Next commit
Updates TimestampGeneratorTests after updating the codegen
  • Loading branch information
epau committed Nov 1, 2022
commit 57c8fca96ab68acbc93944d97b8ccd7147862201
Original file line number Diff line number Diff line change
@@ -26,13 +26,13 @@ class TimestampGeneratorTests {
public func encode(to encoder: Swift.Encoder) throws {
var container = encoder.container(keyedBy: ClientRuntime.Key.self)
if let epochMember = epochMember {
try container.encode(ClientRuntime.TimestampWrapper(epochMember, format: .epochSeconds), forKey: ClientRuntime.Key("epochMember"))
try container.encodeTimestamp(epochMember, format: .epochSeconds, forKey: ClientRuntime.Key("epochMember"))
}
if let epochTarget = epochTarget {
try container.encode(ClientRuntime.TimestampWrapper(epochTarget, format: .epochSeconds), forKey: ClientRuntime.Key("epochTarget"))
try container.encodeTimestamp(epochTarget, format: .epochSeconds, forKey: ClientRuntime.Key("epochTarget"))
}
if let normalFormat = normalFormat {
try container.encode(ClientRuntime.TimestampWrapper(normalFormat, format: .dateTime), forKey: ClientRuntime.Key("normalFormat"))
try container.encodeTimestamp(normalFormat, format: .dateTime, forKey: ClientRuntime.Key("normalFormat"))
}
try container.encode("QueryTimestamps", forKey:ClientRuntime.Key("Action"))
try container.encode("2020-01-08", forKey:ClientRuntime.Key("Version"))