How to set a time zone in Puppeteer for page

Puppeteer allows blocking any outgoing requests while loading the page. Whether you want to block ads, tracking scripts, or different types of resources, it is relatively easy to do with Puppeteer.

1 min read

Written by

Dmytro Krasun

Updated on

By the way, in our screenshot API, you can take the screenshot of the element by specifying the time zone parameter.

Puppeteer allows changing the time zone on a per-page basis. In automation testing, you can test how the website behaves for different time zones. Or you can use it for scrapping to imitate the user from the expected time zone by the site.

It is reasonably simple to do by using page.emulateTimezone(timezoneId):

const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({});
try {
const page = await browser.newPage();
await page.emulateTimezone('Europe/London');
await page.goto('https://screenshotone.com/');
} catch (e) {
console.log(e)
} finally {
await browser.close();
}
})();

The list of available time zones you can find at Chromium source code, these are the most popular ones:

  • America/Santiago
  • Asia/Shanghai
  • Europe/Berlin
  • America/Guayaquil
  • Europe/Madrid
  • Pacific/Majuro
  • Asia/Kuala_Lumpur
  • Pacific/Auckland
  • Europe/Lisbon
  • Europe/Kiev
  • Asia/Tashkent
  • Europe/London

I hope I have helped solve the issue and I wish you a nice day!

Read more posts

Interviews, tips, guides, industry best practices, and news.

View all posts
3 best screenshot APIs in 2025

3 best screenshot APIs in 2025

The truth is, that there is no single best screenshot API that fits everyone. But some APIs stand out and shine when compared to others. Also, it depends on your use case and needs which must be included in considering what API to use.

Read more

Automate website screenshots

Exhaustive documentation, ready SDKs, no-code tools, and other automation to help you render website screenshots and outsource all the boring work related to that to us.