How to set the correct timezone of Chrome in TestOps?

hey @maurits.lourens

I think the TestOps timezone setting doesn’t actually affect the Chrome browser that launches during tests. it seems you need to pass the timezone directly to Chrome. try to add this to your test setup:

ChromeOptions options = new ChromeOptions()
Map<String, String> env = new HashMap<>()
env.put("TZ", "Europe/Amsterdam")
options.setExperimentalOption("env", env)

WebDriver driver = new ChromeDriver(options)
DriverFactory.changeWebDriver(driver)

or if you’re using Desired Capabilities:

goog:chromeOptions = {
  "env": {
    "TZ": "Europe/Amsterdam"
  }
}

Chrome defaults to the system timezone (probably UTC), which is why you’re seeing that 2-hour difference. I think this should force it to use the correct timezone