Comment #1 on issue 1944 by utatane.tea: Date.parse doesn't accept leap second
http://code.google.com/p/v8/issues/detail?id=1944

Above patch considers 60 over seconds.

for example,

  '1999-12-31T23:59:60.999'

in this case, second is 60.999. This is Java's behavior.

On the other hand, JSC clamp this to 60 second.
http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/wtf/DateMath.cpp?rev=104527#L725
in JSC way,

Date.parse('1999-12-31T23:59:60.999') === Date.parse('1999-12-31T23:59:60.000')

So I attached another version patch, that clamp second over 60 to 60.


Attachments:
        leap-second-2.patch  2.1 KB

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to