Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set locale and timezoneId in Playwright’s browser context to control the language-sensitive content and local time shown in a screenshot. In Playwright Test, put them under use in playwright.config.ts; for a single test, override them with test.use(). These browser settings do not change the test runner’s timezone.

Set locale and timezone for every Playwright Test

Add both options to the global use configuration in playwright.config.ts. This makes the browser context for tests use the chosen locale and timezone.

import { defineConfig } from '@playwright/test';

export default defineConfig({
  use: {
    locale: 'en-GB',
    timezoneId: 'Europe/Paris',
  },
});

Replace the example values with the language-region tag and timezone identifier your application needs. The examples use standard identifiers documented by Playwright; check the documentation for your installed Playwright version if you need version-specific details: Playwright emulation.

Override the settings for one test

Use test.use() in a test file when only that file’s tests need different browser settings:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
import { test } from '@playwright/test';

test.use({
  locale: 'de-DE',
  timezoneId: 'Europe/Berlin',
});

This changes the browser context options for tests in that file rather than changing the global configuration.

Set options when creating a browser context directly

If you use Playwright’s library API rather than the Playwright Test runner, pass the options to browser.newContext() before creating a page:

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
const context = await browser.newContext({
  locale: 'de-DE',
  timezoneId: 'Europe/Berlin',
});
const page = await context.newPage();

The context settings apply to pages created in that context. For a normal image capture, save the screenshot with page.screenshot(); add fullPage: true if you need the full scrollable page:

await page.goto('https://example.com');
await page.screenshot({ path: 'screenshot.png', fullPage: true });

See Playwright’s screenshot guide for full-page and element capture options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

What locale and timezone change

locale

Playwright’s locale emulation affects navigator.language, the browser’s Accept-Language request header, and locale-sensitive number and date formatting. It can therefore change both the page language selected by a site and how values appear on screen. The exact result still depends on how the website uses those browser signals. See the browser context options.

timezoneId

timezoneId sets the timezone for the browser context. Playwright documents the system timezone as the default and points to ICU-supported timezone identifiers. Use an identifier such as Europe/Paris, rather than assuming that a locale setting also sets a timezone.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

The test runner is separate

These options control browser behavior; they do not set the timezone of the Playwright Test runner or other Node.js code. If your test compares browser output with dates created in the runner, align the runner environment separately when necessary, for example with the TZ environment variable. Treat browser and runner timezone as separate test inputs.

Keep screenshot comparisons reliable

Matching locale and timezone helps stabilize language-sensitive content, dates, and numbers, but it does not ensure pixel-identical screenshots. Playwright notes that rendering can vary with the operating system, browser version and settings, hardware, power source, and headless mode. Generate and compare visual baselines in the same rendering environment whenever possible. See Playwright visual comparisons.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
  • Keep the browser and operating-system environment consistent with the one used to generate the baseline.
  • Use toHaveScreenshot() for screenshot assertions in Playwright Test.
  • Use the visual-comparison configuration for expected differences, and a custom stylesheet to hide known dynamic or volatile elements when appropriate.
  • Do not use a tolerance setting to mask unexplained rendering changes; first determine whether the difference is expected.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot unexpected output

The date or time is still unexpected

Confirm that timezoneId is set on the context that owns the page being captured. If the value is created in test-runner code, remember that browser context options do not set the runner timezone; configure TZ separately if the runner must use a particular timezone.

The page is in the wrong language

Check the exact locale value and verify that the site responds to the browser’s locale signals. Locale affects navigator.language and Accept-Language, but a site’s language selection logic determines what it actually renders.

The screenshot differs from the baseline

Check whether the browser version, operating system, settings, hardware, or headless mode changed. Locale and timezone control only some inputs to rendering, not the complete screenshot environment.

Or skip the browser setup

For a one-call capture, ScreenshotNeo accepts a URL and returns a screenshot. Its clean-shot flow accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses identify the page verdict and billing status in headers. Its MCP server provides screenshot tools for AI agents, including Claude and Cursor.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For example, using cURL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. ScreenshotNeo has a free plan with 1,000 screenshots a month and no card required; paid plans start at $5 for 3,000. Learn about ScreenshotNeo and sign up for 1,000 free screenshots a month, with no card.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.