Skip to content
HTML/CSS to ImageDocs

Control the timezone used when rendering your images

The timezone parameter sets Chrome’s timezone when rendering your image. This affects how dates, times, and any timezone-dependent content are displayed.

Pass any valid IANA timezone identifier, such as:

Timezone Description
America/New_York Eastern Time (US)
America/Los_Angeles Pacific Time (US)
Europe/London UK Time
Europe/Paris Central European Time
Asia/Tokyo Japan Standard Time
Australia/Sydney Australian Eastern Time
UTC Coordinated Universal Time

Use timezone when:

  • Taking screenshots that display the current time
  • Rendering content with timezone-specific dates
  • Testing how your application appears in different timezones
  • Generating reports for specific regions
Terminal window
curl -X POST https://hcti.io/v1/image -u 'UserID:APIKey' \
--data-urlencode url="https://time.is" \
--data timezone="America/New_York"
{
"url": "https://calendar.google.com",
"timezone": "Europe/London"
}
{
"html": "<div id='time'></div><script>document.getElementById('time').textContent = new Date().toLocaleString();</script>",
"timezone": "Asia/Tokyo",
"ms_delay": 500
}

Generate reports showing local times for different regions:

{
"html": "<div class='report-header'>Generated: <span id='date'></span></div><script>document.getElementById('date').textContent = new Date().toLocaleString();</script>",
"timezone": "America/Chicago",
"ms_delay": 500
}

Capture calendar views in the correct timezone:

{
"url": "https://calendar.example.com",
"timezone": "Europe/Berlin",
"viewport_width": 1200,
"viewport_height": 800
}

Test how your application displays dates for users in different timezones:

{
"url": "https://myapp.com/dashboard",
"timezone": "Australia/Melbourne"
}

When timezone is set:

  • JavaScript’s Date object will use the specified timezone
  • Intl.DateTimeFormat will default to the specified timezone
  • Any website that detects timezone will see the specified value

Need help?

Talk to a human. Email support@htmlcsstoimage.com and we’ll help you get started.