[webkit-reviews] review granted: [Bug 239865] Format time zone name using ICU instead of platform calls : [Attachment 458557] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 28 17:51:40 PDT 2022


Yusuke Suzuki <ysuzuki at apple.com> has granted Yury Semikhatsky
<yurys at chromium.org>'s request for review:
Bug 239865: Format time zone name using ICU instead of platform calls
https://bugs.webkit.org/show_bug.cgi?id=239865

Attachment 458557: Patch

https://bugs.webkit.org/attachment.cgi?id=458557&action=review




--- Comment #9 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 458557
  --> https://bugs.webkit.org/attachment.cgi?id=458557
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=458557&action=review

r=me with nit.

> JSTests/stress/date-format-timezone.js:12
> +if (Intl.DateTimeFormat().resolvedOptions().timeZone ===
'America/Los_Angeles') {
> +  // 'Thu Apr 28 2022 14:42:34 GMT-0700 (Pacific Daylight Time)'
> +  const date = new Date(1651182154409);
> +  $vm.setUserPreferredLanguages(['de-DE']);
> +  shouldBe(date.toString(), 'Thu Apr 28 2022 14:42:34 GMT-0700
(Nordamerikanische Westküsten-Sommerzeit)');
> +  shouldBe(date.toTimeString(), '14:42:34 GMT-0700 (Nordamerikanische
Westküsten-Sommerzeit)');
> +}

You can use JSTests/complex.yaml and JSTests/complex directory to control TZ
configuration. There are some tests setting TZ to "America/Los_Angeles", so you
can just copy the approach :)


More information about the webkit-reviews mailing list