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 bf738fe commit 70c0af1Copy full SHA for 70c0af1
Sources/AWSLambdaRuntime/FoundationSupport/Context+Foundation.swift
@@ -20,9 +20,11 @@ import struct Foundation.Date
20
#endif
21
22
extension LambdaContext {
23
+ /// Returns the deadline as a Date for the Lambda function execution.
24
+ /// I'm not sure how usefull it is to have this as a Date, with only seconds precision,
25
+ /// but I leave it here for compatibility with the FoundationJSONSupport trait.
26
var deadlineDate: Date {
- let secondsSinceEpoch = Double(self.deadline.milliseconds()) / -1_000_000_000
- return Date(timeIntervalSince1970: secondsSinceEpoch)
27
+ Date(timeIntervalSince1970: Double(self.deadline.milliseconds()) / 1000)
28
}
29
30
#endif // trait: FoundationJSONSupport
0 commit comments