<?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>172637</bug_id>
          
          <creation_ts>2017-05-26 02:04:10 -0700</creation_ts>
          <short_desc>REGRESSION(r217458): 55 javascript tests are failing after r217458 on Linux and Windows</short_desc>
          <delta_ts>2017-05-26 12:29:59 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>172592</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk, Regression</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>172592</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>csaavedra</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>ossy</cc>
    
    <cc>ryanhaddad</cc>
    
    <cc>ysuzuki</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1313083</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-05-26 02:04:10 -0700</bug_when>
    <thetext>I guess localtime behaves differently in Mac OS and Linux, maybe we need to bring back the deleted code for linux only?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313084</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-05-26 02:04:38 -0700</bug_when>
    <thetext>** The following JSC stress test failures have been introduced:
	ChakraCore.yaml/ChakraCore/test/Date/DateCtr.js.default
	jsc-layout-tests.yaml/js/script-tests/date-constructor.js.layout
	jsc-layout-tests.yaml/js/script-tests/date-constructor.js.layout-dfg-eager-no-cjit
	jsc-layout-tests.yaml/js/script-tests/date-constructor.js.layout-ftl-eager-no-cjit
	jsc-layout-tests.yaml/js/script-tests/date-constructor.js.layout-ftl-no-cjit
	jsc-layout-tests.yaml/js/script-tests/date-constructor.js.layout-no-cjit
	jsc-layout-tests.yaml/js/script-tests/date-constructor.js.layout-no-ftl
	jsc-layout-tests.yaml/js/script-tests/date-constructor.js.layout-no-llint
	jsc-layout-tests.yaml/js/script-tests/date-timeClip-large-values.js.layout
	jsc-layout-tests.yaml/js/script-tests/date-timeClip-large-values.js.layout-dfg-eager-no-cjit
	jsc-layout-tests.yaml/js/script-tests/date-timeClip-large-values.js.layout-ftl-eager-no-cjit
	jsc-layout-tests.yaml/js/script-tests/date-timeClip-large-values.js.layout-ftl-no-cjit
	jsc-layout-tests.yaml/js/script-tests/date-timeClip-large-values.js.layout-no-cjit
	jsc-layout-tests.yaml/js/script-tests/date-timeClip-large-values.js.layout-no-ftl
	jsc-layout-tests.yaml/js/script-tests/date-timeClip-large-values.js.layout-no-llint
	mozilla-tests.yaml/ecma/Date/15.9.5.16.js.mozilla
	mozilla-tests.yaml/ecma/Date/15.9.5.16.js.mozilla-baseline
	mozilla-tests.yaml/ecma/Date/15.9.5.16.js.mozilla-dfg-eager-no-cjit-validate-phases
	mozilla-tests.yaml/ecma/Date/15.9.5.16.js.mozilla-ftl-eager-no-cjit-validate-phases
	mozilla-tests.yaml/ecma/Date/15.9.5.16.js.mozilla-llint
	mozilla-tests.yaml/ecma/Date/15.9.5.16.js.mozilla-no-ftl
	mozilla-tests.yaml/ecma/Date/15.9.5.18.js.mozilla
	mozilla-tests.yaml/ecma/Date/15.9.5.18.js.mozilla-baseline
	mozilla-tests.yaml/ecma/Date/15.9.5.18.js.mozilla-dfg-eager-no-cjit-validate-phases
	mozilla-tests.yaml/ecma/Date/15.9.5.18.js.mozilla-ftl-eager-no-cjit-validate-phases
	mozilla-tests.yaml/ecma/Date/15.9.5.18.js.mozilla-llint
	mozilla-tests.yaml/ecma/Date/15.9.5.18.js.mozilla-no-ftl
	mozilla-tests.yaml/ecma/Date/15.9.5.22-1.js.mozilla
	mozilla-tests.yaml/ecma/Date/15.9.5.22-1.js.mozilla-baseline
	mozilla-tests.yaml/ecma/Date/15.9.5.22-1.js.mozilla-dfg-eager-no-cjit-validate-phases
	mozilla-tests.yaml/ecma/Date/15.9.5.22-1.js.mozilla-ftl-eager-no-cjit-validate-phases
	mozilla-tests.yaml/ecma/Date/15.9.5.22-1.js.mozilla-llint
	mozilla-tests.yaml/ecma/Date/15.9.5.22-1.js.mozilla-no-ftl
	mozilla-tests.yaml/ecma/Date/15.9.5.22-2.js.mozilla
	mozilla-tests.yaml/ecma/Date/15.9.5.22-2.js.mozilla-baseline
	mozilla-tests.yaml/ecma/Date/15.9.5.22-2.js.mozilla-dfg-eager-no-cjit-validate-phases
	mozilla-tests.yaml/ecma/Date/15.9.5.22-2.js.mozilla-ftl-eager-no-cjit-validate-phases
	mozilla-tests.yaml/ecma/Date/15.9.5.22-2.js.mozilla-llint
	mozilla-tests.yaml/ecma/Date/15.9.5.22-2.js.mozilla-no-ftl
	stress/date-relaxed.js.default
	stress/date-relaxed.js.dfg-eager
	stress/date-relaxed.js.dfg-eager-no-cjit-validate
	stress/date-relaxed.js.dfg-maximal-flush-validate-no-cjit
	stress/date-relaxed.js.ftl-eager
	stress/date-relaxed.js.ftl-eager-no-cjit
	stress/date-relaxed.js.ftl-eager-no-cjit-b3o1
	stress/date-relaxed.js.ftl-no-cjit-b3o1
	stress/date-relaxed.js.ftl-no-cjit-no-inline-validate
	stress/date-relaxed.js.ftl-no-cjit-no-put-stack-validate
	stress/date-relaxed.js.ftl-no-cjit-small-pool
	stress/date-relaxed.js.ftl-no-cjit-validate-sampling-profiler
	stress/date-relaxed.js.no-cjit-collect-continuously
	stress/date-relaxed.js.no-cjit-validate-phases
	stress/date-relaxed.js.no-ftl
	stress/date-relaxed.js.no-llint

Results for JSC stress tests:
    55 failures found.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313099</commentid>
    <comment_count>2</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-05-26 03:35:41 -0700</bug_when>
    <thetext>It seems something goes wrong.

// Set TZ=America/Los_Angeles
let date = new Date(&quot;May 8 -1&quot;);
print(date);

&quot;Fri May 07 -001 23:59:02 GMT-0752 (LMT)&quot;

Maybe, Linux returns wrong value if the year is not within expected ones.

I dumped some of is_dst and tm_gmtoff * msPerSecond.

If dst is set,
1 -25200000.000000

If dst is not set,
0 -28800000.000000

That&apos;s correct. In the above (-1 year) case,

0 -28378000.000000

That&apos;s clearly wrong.
I think we should recover the previous code for non-darwin environment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313101</commentid>
    <comment_count>3</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-05-26 03:53:45 -0700</bug_when>
    <thetext>(In reply to Yusuke Suzuki from comment #2)
&gt; It seems something goes wrong.
&gt; 
&gt; // Set TZ=America/Los_Angeles
&gt; let date = new Date(&quot;May 8 -1&quot;);
&gt; print(date);
&gt; 
&gt; &quot;Fri May 07 -001 23:59:02 GMT-0752 (LMT)&quot;
&gt; 
&gt; Maybe, Linux returns wrong value if the year is not within expected ones.
&gt; 
&gt; I dumped some of is_dst and tm_gmtoff * msPerSecond.
&gt; 
&gt; If dst is set,
&gt; 1 -25200000.000000
&gt; 
&gt; If dst is not set,
&gt; 0 -28800000.000000
&gt; 
&gt; That&apos;s correct. In the above (-1 year) case,
&gt; 
&gt; 0 -28378000.000000
&gt; 
&gt; That&apos;s clearly wrong.
&gt; I think we should recover the previous code for non-darwin environment.

Ah, No! That&apos;s more correct. It is Local Mean Time!
Before timezone is introduced, this mechanism is used. And it is replaced with timezone after 1883 Nov 18 12:07:02.
https://github.com/tzinfo/tzinfo-data/blob/master/data/northamerica#L487

But... who wants it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313106</commentid>
    <comment_count>4</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2017-05-26 04:11:10 -0700</bug_when>
    <thetext>*** Bug 172641 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313107</commentid>
    <comment_count>5</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2017-05-26 04:15:32 -0700</bug_when>
    <thetext>Apple Windows port is affected too:
https://build.webkit.org/builders/Apple%20Win%207%20Release%20%28Tests%29/builds/807</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313110</commentid>
    <comment_count>6</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2017-05-26 04:29:53 -0700</bug_when>
    <thetext>In the original patch, some tests that were affected by this were skipped. We could do the same for these tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313119</commentid>
    <comment_count>7</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-05-26 06:35:35 -0700</bug_when>
    <thetext>(In reply to Zan Dobersek from comment #6)
&gt; In the original patch, some tests that were affected by this were skipped.
&gt; We could do the same for these tests.

I&apos;m a bit worried about the current result. If that thing just changes DST switch, it sounds good.
However, the current implementation poses a bit storange Date for old dates.
(Like &quot;Fri May 07 -001 23:59:02 GMT-0752 (LMT)&quot;).

What do you think of reverting the patch for non Darwin environment?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313120</commentid>
    <comment_count>8</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2017-05-26 06:59:08 -0700</bug_when>
    <thetext>(In reply to Yusuke Suzuki from comment #7)
&gt; (In reply to Zan Dobersek from comment #6)
&gt; &gt; In the original patch, some tests that were affected by this were skipped.
&gt; &gt; We could do the same for these tests.
&gt; 
&gt; I&apos;m a bit worried about the current result. If that thing just changes DST
&gt; switch, it sounds good.
&gt; However, the current implementation poses a bit storange Date for old dates.
&gt; (Like &quot;Fri May 07 -001 23:59:02 GMT-0752 (LMT)&quot;).
&gt; 
&gt; What do you think of reverting the patch for non Darwin environment?

Do we remain compliant with the relevant specs? We should maybe wait for Keith to weigh in.

One additional observation -- in run-javascriptcore-tests, we set the TZ env to the PST timezone. But at least for the failing tests under mozilla-tests.yaml/ecma/Date/, if that TZ env is set to UTC or GMT, the test passes because LMT doesn&apos;t kick in for the date that is far back in the past.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313122</commentid>
    <comment_count>9</comment_count>
    <who name="Keith Miller">keith_miller</who>
    <bug_when>2017-05-26 07:13:13 -0700</bug_when>
    <thetext>Hmm, it looks like FF and Chrome turn &quot;new Date(&quot;May 8 -1&quot;)&quot; into NaN. Perhaps we should have the same result here?

As far as LMT it doesn&apos;t look like the spec mentions it: https://tc39.github.io/ecma262/#sec-local-time-zone-adjustment. So it seems like we should avoid using it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313124</commentid>
    <comment_count>10</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-05-26 07:25:32 -0700</bug_when>
    <thetext>(In reply to Keith Miller from comment #9)
&gt; Hmm, it looks like FF and Chrome turn &quot;new Date(&quot;May 8 -1&quot;)&quot; into NaN.
&gt; Perhaps we should have the same result here?
&gt; 
&gt; As far as LMT it doesn&apos;t look like the spec mentions it:
&gt; https://tc39.github.io/ecma262/#sec-local-time-zone-adjustment. So it seems
&gt; like we should avoid using it.

LMT can be easily seen if you use a bit old date (but it&apos;s not so old, year &lt; 1883).
For example, `new Date(&quot;May 8 1880&quot;)` will show &quot;Fri May 07 1880 23:59:02 GMT-0752 (LMT)&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313126</commentid>
    <comment_count>11</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-05-26 07:30:28 -0700</bug_when>
    <thetext>(In reply to Yusuke Suzuki from comment #10)
&gt; (In reply to Keith Miller from comment #9)
&gt; &gt; Hmm, it looks like FF and Chrome turn &quot;new Date(&quot;May 8 -1&quot;)&quot; into NaN.
&gt; &gt; Perhaps we should have the same result here?
&gt; &gt; 
&gt; &gt; As far as LMT it doesn&apos;t look like the spec mentions it:
&gt; &gt; https://tc39.github.io/ecma262/#sec-local-time-zone-adjustment. So it seems
&gt; &gt; like we should avoid using it.
&gt; 
&gt; LMT can be easily seen if you use a bit old date (but it&apos;s not so old, year
&gt; &lt; 1883).
&gt; For example, `new Date(&quot;May 8 1880&quot;)` will show &quot;Fri May 07 1880 23:59:02
&gt; GMT-0752 (LMT)&quot;.

Another problem is that the end of LMT depends on each TZ.
PDT says &quot;1883 Nov 18 12:07:02&quot;.
Europe/Amsterdam　is +00:19:32 (0:19:32)  - LMT 1835
Asia/Dubai is +03:41:12 (3:41:12)  - LMT 1920</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313196</commentid>
    <comment_count>12</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2017-05-26 12:29:24 -0700</bug_when>
    <thetext>I reverted r217458 in http://trac.webkit.org/changeset/217499</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313197</commentid>
    <comment_count>13</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2017-05-26 12:29:59 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 172592 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>