Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

browser(ff-beta): fix timezone emulation on Win (#9812)

Andrey Lushnikov56b082326918
diff --git a/browser_patches/firefox-beta/BUILD_NUMBER b/browser_patches/firefox-beta/BUILD_NUMBER
index 2dbcc7d271..aebcbfe0e6 100644
--- a/browser_patches/firefox-beta/BUILD_NUMBER
+++ b/browser_patches/firefox-beta/BUILD_NUMBER
@@ -1,2 +1,2 @@
-1298
-Changed: [email protected] Tue 19 Oct 2021 05:01:45 PM PDT
+1299
+Changed: [email protected] Wed 27 Oct 2021 12:40:16 AM PDT
diff --git a/browser_patches/firefox-beta/patches/bootstrap.diff b/browser_patches/firefox-beta/patches/bootstrap.diff
index 90e523ba1e..0decaf1b78 100644
--- a/browser_patches/firefox-beta/patches/bootstrap.diff
+++ b/browser_patches/firefox-beta/patches/bootstrap.diff
@@ -1920,7 +1920,7 @@ index b32d426ba38045d14e6f1e79d17e8e6061e78227..df782034e79466fcc251e9a06e99d2e1
}
diff --git a/js/src/vm/DateTime.cpp b/js/src/vm/DateTime.cpp
-index e8f27fb69691aa6062c860a14ec94660fb9e5189..dd0218a5c2b3f2908f1549b8ef44a73df062b50e 100644
+index e8f27fb69691aa6062c860a14ec94660fb9e5189..67715cbbc8257f11927564b45bbc8ee5384f809d 100644
--- a/js/src/vm/DateTime.cpp
+++ b/js/src/vm/DateTime.cpp
@@ -170,6 +170,11 @@ void js::DateTimeInfo::internalResetTimeZone(ResetTimeZoneMode mode) {
@@ -1964,16 +1964,15 @@ index e8f27fb69691aa6062c860a14ec94660fb9e5189..dd0218a5c2b3f2908f1549b8ef44a73d
void js::DateTimeInfo::internalResyncICUDefaultTimeZone() {
#if JS_HAS_INTL_API
-- if (const char* tzenv = std::getenv("TZ")) {
-- std::string_view tz(tzenv);
-+ std::string_view tz;
+ if (!timeZoneOverride_.empty()) {
-+ tz = timeZoneOverride_;
-+ } else if (const char* tzenv = std::getenv("TZ")) {
-+ tz = std::string_view(tzenv);
++ mozilla::Span<const char> tzid = mozilla::Span(timeZoneOverride_.data(), timeZoneOverride_.length());
++ mozilla::intl::TimeZone::SetDefaultTimeZone(tzid);
++ return;
+ }
-
-+ if (!tz.empty()) {
++
+ if (const char* tzenv = std::getenv("TZ")) {
+ std::string_view tz(tzenv);
+-
mozilla::Span<const char> tzid;
# if defined(XP_WIN)