https://cypress.io logo
hello 🙂 I'd like to know if it's possible to cha...
# general-chat
b
hello 🙂 I'd like to know if it's possible to change the timezone environment variable in a single test as it's in the docs, like this:
Copy code
js
// change environment variable for single suite of tests
describe(
  'timezone test',
  {
    env: {
      TZ: 'America/New_York',
    },
  },
  () => {
    it('displays correct timezone', () => {
      console.log({
        cypressEnv: Cypress.env('TZ'), // America/New_York
        browserTZ: Intl.DateTimeFormat().resolvedOptions().timeZone, // Europe/London but should be America/New_York
      });
    })
  }
)