[Webkit-unassigned] [Bug 150386] New: Safari 8 and 9 have a Date bug with the "milliseconds" param.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 21 00:31:02 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=150386

            Bug ID: 150386
           Summary: Safari 8 and 9 have a Date bug with the "milliseconds"
                    param.
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
               URL: https://github.com/es-shims/es5-shim/issues/329
                OS: Unspecified
            Status: NEW
          Severity: Critical
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ljharb at gmail.com
                CC: darin at apple.com, fpizlo at apple.com, ggaren at apple.com,
                    utatane.tea at gmail.com

See https://github.com/es-shims/es5-shim/issues/329

`new Date(1970, 0, 1,0, 0, 0, 2147483647);` produces a valid Date object, `new Date(1970, 0, 1,0, 0, 0, 2147483648);` does not. 2147483648 is, of course, `Math.pow(2, 31)`.

So, the issue seems to be that Safari 8 and 9 - alone amongst the browsers, it's worth noting - is treating the millisecond parameter to `Date` as a signed 32-bit integer - when in fact, it should allow all integer values up to `Number.MAX_SAFE_INTEGER`: ie, a 64-bit signed integer, also known as a normal JS number value.

This does not appear to be an issue for the other parameters to the 7-arg form of the Date constructor, but when fixing this, please verify that all JS Number values work as expected when passed in as any of the 7 arguments.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151021/fef6812a/attachment.html>


More information about the webkit-unassigned mailing list