Bug 140945

Summary: [Win] Layout Test js/date-constructor.html is failing
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: Tools / TestsAssignee: Ross Kirsling <ross.kirsling>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, bfulgham, cdumez, cmarcelo, commit-queue, dbates, ews-watchlist, ggaren, mark.lam, msaboff, pvollan, ross.kirsling, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=140917
Attachments:
Description Flags
Patch
none
Patch none

Description Brent Fulgham 2015-01-27 11:37:28 PST
The following layout test is failing on Windows

js/date-constructor.html

Failure output:

--- /cygdrive/c/Projects/WebKit/OpenSource/WebKitBuild/Release/bin32/layout-test-results/js/date-constructor-expected.txt
+++ /cygdrive/c/Projects/WebKit/OpenSource/WebKitBuild/Release/bin32/layout-test-results/js/date-constructor-actual.txt
@@ -38,7 +38,9 @@
 PASS new Date(Date.parse('1 Mar 1000 GMT')).toGMTString() is "Sat, 01 Mar 1000 00:00:00 GMT"
 PASS testStr is "1234567"
 PASS testStr is "1234567"
-PASS leapTestResult is true
+WARN: shouldBe() expects string arguments
+FAIL new Date(August 15, 101).getDate() should be 15. Threw exception SyntaxError: Unexpected number '15'. Expected ')' to end a argument list.
+FAIL leapTestResult should be true. Was false.
 PASS successfullyParsed is true
 
 TEST COMPLETE
Comment 1 Radar WebKit Bug Importer 2015-01-27 11:38:19 PST
<rdar://problem/19617672>
Comment 2 Brent Fulgham 2015-01-28 12:51:11 PST
Could be due to Bug 140917.
Comment 3 Ross Kirsling 2018-04-17 18:30:39 PDT
More pointedly:
- `new Date("January 15, 2001")` prints "Mon Jan 15 2001 00:00:00 GMT-0800 (Pacific Standard Time)" (expected)
- `new Date("August 15, 2001")` prints "Tue Aug 14 2001 00:00:00 GMT-3100 (Pacific Daylight Time)" (unexpected)

It seems that we're not checking for a negative diff in calculateDSTOffset on Windows.
Comment 4 Ross Kirsling 2018-04-17 18:36:00 PDT
Created attachment 338176 [details]
Patch
Comment 5 Ross Kirsling 2018-04-17 18:40:52 PDT
Created attachment 338178 [details]
Patch
Comment 6 Per Arne Vollan 2018-04-18 12:38:23 PDT
Comment on attachment 338178 [details]
Patch

R=me.
Comment 7 WebKit Commit Bot 2018-04-18 13:09:29 PDT
Comment on attachment 338178 [details]
Patch

Clearing flags on attachment: 338178

Committed r230774: <https://trac.webkit.org/changeset/230774>
Comment 8 WebKit Commit Bot 2018-04-18 13:09:31 PDT
All reviewed patches have been landed.  Closing bug.