<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>124946</bug_id>
          
          <creation_ts>2013-11-27 12:17:13 -0800</creation_ts>
          <short_desc>[Win] Some JavaScript date tests are failing in non-California Timezones</short_desc>
          <delta_ts>2023-01-15 12:36:32 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Template Framework</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=250553</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>124450</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter>peavo</reporter>
          <assigned_to name="Brent Fulgham">bfulgham</assigned_to>
          <cc>benjamin</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>commit-queue</cc>
    
    <cc>dbates</cc>
    
    <cc>eflews.bot</cc>
    
    <cc>ggaren</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>msaboff</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>954592</commentid>
    <comment_count>0</comment_count>
    <who name="">peavo</who>
    <bug_when>2013-11-27 12:17:13 -0800</bug_when>
    <thetext>When I run the javascript tests on Windows, I get the errors listed below.

I have traced this down to the method calculateDSTOffset in wtf/DateMath.cpp.

On Windows, I think it makes sense to use the native functions for this, instead of using the function getLocalTime, which uses the localtime_s function in the C runtime library.

** The following Mozilla test failures have been introduced:
        ecma/Date/15.9.5.10-1.js
        ecma/Date/15.9.5.10-10.js
        ecma/Date/15.9.5.10-11.js
        ecma/Date/15.9.5.10-12.js
        ecma/Date/15.9.5.10-13.js
        ecma/Date/15.9.5.10-2.js
        ecma/Date/15.9.5.10-3.js
        ecma/Date/15.9.5.10-4.js
        ecma/Date/15.9.5.10-5.js
        ecma/Date/15.9.5.10-6.js
        ecma/Date/15.9.5.10-7.js
        ecma/Date/15.9.5.10-8.js
        ecma/Date/15.9.5.10-9.js
        ecma/Date/15.9.5.12-1.js
        ecma/Date/15.9.5.12-2.js
        ecma/Date/15.9.5.12-3.js
        ecma/Date/15.9.5.12-4.js
        ecma/Date/15.9.5.12-5.js
        ecma/Date/15.9.5.12-6.js
        ecma/Date/15.9.5.12-7.js
        ecma/Date/15.9.5.28-1.js
        ecma/Date/15.9.5.29-1.js
        ecma/Date/15.9.5.35-1.js
        ecma/Date/15.9.5.8.js
        ecma/String/15.5.4.6-2.js

Results for Mozilla tests:
    25 regressions found.
    0 tests fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>954595</commentid>
    <comment_count>1</comment_count>
      <attachid>217963</attachid>
    <who name="">peavo</who>
    <bug_when>2013-11-27 12:24:22 -0800</bug_when>
    <thetext>Created attachment 217963
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>954596</commentid>
    <comment_count>2</comment_count>
    <who name="">peavo</who>
    <bug_when>2013-11-27 12:25:38 -0800</bug_when>
    <thetext>These are the results with the patch included:

Results for Mozilla tests:
    0 regressions found.
    0 tests fixed.
    OK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>954597</commentid>
    <comment_count>3</comment_count>
    <who name="">peavo</who>
    <bug_when>2013-11-27 12:27:34 -0800</bug_when>
    <thetext>Also see bug 25160.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>954600</commentid>
    <comment_count>4</comment_count>
      <attachid>217963</attachid>
    <who name="EFL EWS Bot">eflews.bot</who>
    <bug_when>2013-11-27 12:58:34 -0800</bug_when>
    <thetext>Comment on attachment 217963
Patch

Attachment 217963 did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/38598062</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>954604</commentid>
    <comment_count>5</comment_count>
    <who name="">peavo</who>
    <bug_when>2013-11-27 13:22:06 -0800</bug_when>
    <thetext>The efl-wk2 build seems to fail with an internal compiler error in a different file, so I don&apos;t think that is related to this patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>954757</commentid>
    <comment_count>6</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2013-11-28 09:22:44 -0800</bug_when>
    <thetext>Do these same failures happen under Apple&apos;s Windows port? It looks like there are 11 jscore errors, but I can&apos;t see what those errors arson the buildbots. Still, they can&apos; t be the same just based on counts.

Should we only use this code path for the WinCairo port?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>955059</commentid>
    <comment_count>7</comment_count>
    <who name="">peavo</who>
    <bug_when>2013-11-30 00:52:42 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; Do these same failures happen under Apple&apos;s Windows port? It looks like there are 11 jscore errors, but I can&apos;t see what those errors arson the buildbots. Still, they can&apos; t be the same just based on counts.
&gt; 
&gt; Should we only use this code path for the WinCairo port?

Thanks for looking into this :)

Yes, I get the exact same errors when running WinApple.

The strange thing is that, when I change the timezone to e.g. California-time (UTC - 8.00, I think), there are no errors, both with, and without the patch.
It seems the results depends on which timezone you are in, which might explain why we are seeing different results.

With the patch, I get no errors in both timezones.

To be on the safe side, I can make this patch WinCairo-only. Your call :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>955098</commentid>
    <comment_count>8</comment_count>
      <attachid>217963</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2013-11-30 19:04:26 -0800</bug_when>
    <thetext>Comment on attachment 217963
Patch

R=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>955099</commentid>
    <comment_count>9</comment_count>
      <attachid>217963</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-11-30 19:30:57 -0800</bug_when>
    <thetext>Comment on attachment 217963
Patch

Clearing flags on attachment: 217963

Committed r159892: &lt;http://trac.webkit.org/changeset/159892&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>955100</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-11-30 19:30:59 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>955133</commentid>
    <comment_count>11</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2013-11-30 22:52:05 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #6)
&gt; &gt; Do these same failures happen under Apple&apos;s Windows port? It looks like there are 11 jscore errors, but I can&apos;t see what those errors arson the buildbots. Still, they can&apos; t be the same just based on counts.
&gt; &gt; 
&gt; Thanks for looking into this :)
&gt; 
&gt; Yes, I get the exact same errors when running WinApple.
&gt; 
&gt; The strange thing is that, when I change the timezone to e.g. California-time (UTC - 8.00, I think), there are no errors, both with, and without the patch.
&gt; It seems the results depends on which timezone you are in, which might explain why we are seeing different results.
&gt; 
&gt; With the patch, I get no errors in both timezones.
&gt; 

Very interesting. I wonder if this indicates a general weakness in our test coverage. All of our test bots live in California, and use that time zone.

Thanks for catching this!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>971190</commentid>
    <comment_count>12</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2014-01-23 09:44:49 -0800</bug_when>
    <thetext>(In reply to comment #9)
&gt; (From update of attachment 217963 [details])
&gt; Clearing flags on attachment: 217963
&gt; 
&gt; Committed r159892: &lt;http://trac.webkit.org/changeset/159892&gt;

Using the data on the Flakiness Dashboard (*) as a starting point (**) and comparing the Windows {Debug, Release} expected results diffs, this commit regressed test LayoutTests/js/dom/date-big-constructor.html

(*) &lt;http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&amp;tests=js%2Fdom%2Fdate-big-constructor.html&gt;

(**) The Flakiness Dashboard only has data that shows the test passed in r159891 and failed since r159894. Looking at the commits in [r159891, r159894], &lt;http://trac.webkit.org/changeset/159892&gt; seemed relevant given that it&apos;s the only patch that touched code related to date logic. Moreover, the description of this bug is with regards to JavaScript date tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>971191</commentid>
    <comment_count>13</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2014-01-23 09:45:36 -0800</bug_when>
    <thetext>&lt;rdar://problem/15892592&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>971193</commentid>
    <comment_count>14</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2014-01-23 09:47:07 -0800</bug_when>
    <thetext>Interesting!  So we fixed ecma problems, but somehow broke a layout test?

What is the layout test failure? Could it be that we had bad expectations checked in?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>971200</commentid>
    <comment_count>15</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2014-01-23 09:49:02 -0800</bug_when>
    <thetext>(In reply to comment #12)
&gt; (In reply to comment #9)
&gt; &gt; (From update of attachment 217963 [details] [details])
&gt; &gt; Clearing flags on attachment: 217963
&gt; &gt; 
&gt; &gt; Committed r159892: &lt;http://trac.webkit.org/changeset/159892&gt;
&gt; 
&gt; Using the data on the Flakiness Dashboard (*) as a starting point (**) and comparing the Windows {Debug, Release} expected results diffs, this commit regressed test LayoutTests/js/dom/date-big-constructor.html
&gt; 
&gt; [...]

Filed bug #127492 for the regression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>971203</commentid>
    <comment_count>16</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2014-01-23 09:51:10 -0800</bug_when>
    <thetext>(In reply to comment #14)
&gt; Interesting!  So we fixed ecma problems, but somehow broke a layout test?
&gt; 

Yes, according to the Flakiness Dashboard.

&gt; What is the layout test failure? Could it be that we had bad expectations checked in?

Windows disagrees with the cross-platform expected results for the test.

Windows Debug bot diff:
&lt;http://build.webkit.org/results/Apple%20Win%207%20Debug%20(Tests)/r162609%20(57442)/js/dom/date-big-constructor-pretty-diff.html&gt;

Window Release Bot diff (identical to the Windows Debug bot diff):
&lt;http://build.webkit.org/results/Apple%20Win%207%20Release%20(Tests)/r162610%20(41968)/js/dom/date-big-constructor-pretty-diff.html&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>217963</attachid>
            <date>2013-11-27 12:24:22 -0800</date>
            <delta_ts>2013-11-30 19:30:56 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-124946-20131127212408.patch</filename>
            <type>text/plain</type>
            <size>2483</size>
            <attacher>peavo</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XVEYvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJjZS9XVEYvQ2hh
bmdlTG9nCShyZXZpc2lvbiAxNTk4MjIpCisrKyBTb3VyY2UvV1RGL0NoYW5nZUxvZwkod29ya2lu
ZyBjb3B5KQpAQCAtMSwzICsxLDE2IEBACisyMDEzLTExLTI3ICBwZWF2b0BvdXRsb29rLmNvbSAg
PHBlYXZvQG91dGxvb2suY29tPgorCisgICAgICAgIFtXaW5dIFNvbWUgSmF2YVNjcmlwdCBkYXRl
IHRlc3RzIGFyZSBmYWlsaW5nLgorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93
X2J1Zy5jZ2k/aWQ9MTI0OTQ2CisKKyAg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