Title: [269502] trunk/JSTests
Revision
269502
Author
[email protected]
Date
2020-11-05 20:18:57 -0800 (Thu, 05 Nov 2020)

Log Message

toLocaleDateString() resolves incorrect date for some old dates
https://bugs.webkit.org/show_bug.cgi?id=161623

Reviewed by Ryosuke Niwa.

The issue is that timezone offset in old Warsaw date was broken because `localtime_r`'s tzdata is broken.
The issue itself was fixed in r218348. This patch adds another test case to ensure this is fixed.

* complex.yaml:
* complex/timezone-offset-and-dst-in-warsaw.js: Added.
(shouldBe):

Modified Paths

Added Paths

Diff

Modified: trunk/JSTests/ChangeLog (269501 => 269502)


--- trunk/JSTests/ChangeLog	2020-11-06 03:07:28 UTC (rev 269501)
+++ trunk/JSTests/ChangeLog	2020-11-06 04:18:57 UTC (rev 269502)
@@ -1,3 +1,17 @@
+2020-11-05  Yusuke Suzuki  <[email protected]>
+
+        toLocaleDateString() resolves incorrect date for some old dates
+        https://bugs.webkit.org/show_bug.cgi?id=161623
+
+        Reviewed by Ryosuke Niwa.
+
+        The issue is that timezone offset in old Warsaw date was broken because `localtime_r`'s tzdata is broken.
+        The issue itself was fixed in r218348. This patch adds another test case to ensure this is fixed.
+
+        * complex.yaml:
+        * complex/timezone-offset-and-dst-in-warsaw.js: Added.
+        (shouldBe):
+
 2020-11-03  Saam Barati  <[email protected]>
 
         Add back the removed assertion from r269338 and add a test

Added: trunk/JSTests/complex/timezone-offset-and-dst-in-warsaw.js (0 => 269502)


--- trunk/JSTests/complex/timezone-offset-and-dst-in-warsaw.js	                        (rev 0)
+++ trunk/JSTests/complex/timezone-offset-and-dst-in-warsaw.js	2020-11-06 04:18:57 UTC (rev 269502)
@@ -0,0 +1,6 @@
+function shouldBe(actual, expected) {
+    if (actual !== expected)
+        throw new Error('bad value: ' + actual);
+}
+
+shouldBe((new Date(1969, 8, 26)).toLocaleDateString(), `9/26/1969`);

Modified: trunk/JSTests/complex.yaml (269501 => 269502)


--- trunk/JSTests/complex.yaml	2020-11-06 03:07:28 UTC (rev 269501)
+++ trunk/JSTests/complex.yaml	2020-11-06 04:18:57 UTC (rev 269502)
@@ -34,3 +34,6 @@
 
 - path: complex/timezone-offset-before-america-los-angeles-is-defined.js
   cmd: runComplexTest [], [], "TZ=America/Los_Angeles", "--useDollarVM=1"
+
+- path: complex/timezone-offset-and-dst-in-warsaw.js
+  cmd: runComplexTest [], [], "TZ=Europe/Warsaw", "--useDollarVM=1"
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to