Title: [286454] trunk/Source/WebCore
Revision
286454
Author
[email protected]
Date
2021-12-02 14:27:27 -0800 (Thu, 02 Dec 2021)

Log Message

[Apple Pay] recurring line items appear way in the future
https://bugs.webkit.org/show_bug.cgi?id=233779
<rdar://problem/85976407>

Reviewed by Wenson Hsieh.

_javascript_ `Date` uses a milliseconds-based value, whereas native `NSDate` is seconds-based.

* Modules/applepay/cocoa/PaymentSummaryItemsCocoa.mm:
(WebCore::toDate):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (286453 => 286454)


--- trunk/Source/WebCore/ChangeLog	2021-12-02 22:22:49 UTC (rev 286453)
+++ trunk/Source/WebCore/ChangeLog	2021-12-02 22:27:27 UTC (rev 286454)
@@ -1,3 +1,16 @@
+2021-12-02  Devin Rousso  <[email protected]>
+
+        [Apple Pay] recurring line items appear way in the future
+        https://bugs.webkit.org/show_bug.cgi?id=233779
+        <rdar://problem/85976407>
+
+        Reviewed by Wenson Hsieh.
+
+        _javascript_ `Date` uses a milliseconds-based value, whereas native `NSDate` is seconds-based.
+
+        * Modules/applepay/cocoa/PaymentSummaryItemsCocoa.mm:
+        (WebCore::toDate):
+
 2021-12-02  Chris Dumez  <[email protected]>
 
         MessageChannel::port1() / port2() should return references instead of pointers

Modified: trunk/Source/WebCore/Modules/applepay/cocoa/PaymentSummaryItemsCocoa.mm (286453 => 286454)


--- trunk/Source/WebCore/Modules/applepay/cocoa/PaymentSummaryItemsCocoa.mm	2021-12-02 22:22:49 UTC (rev 286453)
+++ trunk/Source/WebCore/Modules/applepay/cocoa/PaymentSummaryItemsCocoa.mm	2021-12-02 22:27:27 UTC (rev 286454)
@@ -62,7 +62,7 @@
 
 static NSDate *toDate(double date)
 {
-    return [NSDate dateWithTimeIntervalSince1970:date];
+    return [NSDate dateWithTimeIntervalSince1970:(date / 1000)];
 }
 
 #endif // HAVE(PASSKIT_RECURRING_SUMMARY_ITEM) || HAVE(PASSKIT_DEFERRED_SUMMARY_ITEM)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to