We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7cd0a6 commit 44682f7Copy full SHA for 44682f7
stdlib/public/SDK/Foundation/Codable.swift
@@ -17,12 +17,12 @@
17
extension Date : Codable {
18
public init(from decoder: Decoder) throws {
19
let timestamp = try decoder.singleValueContainer().decode(Double.self)
20
- self.init(timeIntervalSince1970: timestamp)
+ self.init(timeIntervalSinceReferenceDate: timestamp)
21
}
22
23
public func encode(to encoder: Encoder) throws {
24
var container = encoder.singleValueContainer()
25
- try container.encode(self.timeIntervalSince1970)
+ try container.encode(self.timeIntervalSinceReferenceDate)
26
27
28
0 commit comments