Link Search Menu Expand Document

Using timezone

Control the timezone used when rendering your images


How it works

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

Values

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

When to use it

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

Example usage

Screenshot with specific timezone

curl -X POST https://hcti.io/v1/image -u 'UserID:APIKey' \
     --data-urlencode url="https://time.is" \
     --data timezone="America/New_York"

JSON request

{
  "url": "https://calendar.google.com",
  "timezone": "Europe/London"
}

HTML with JavaScript dates

{
  "html": "<div id='time'></div><script>document.getElementById('time').textContent = new Date().toLocaleString();</script>",
  "timezone": "Asia/Tokyo",
  "ms_delay": 500
}

Common use cases

Regional reports

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
}

Calendar screenshots

Capture calendar views in the correct timezone:

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

Testing localized content

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

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

Technical details

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

Tip

Use timezone identifiers, not abbreviations. For example, use ‘America/New_York’ instead of ‘EST’ or ‘EDT’.


Need help?

Talk to a human. Please email us support@htmlcsstoimage.com with any questions and we’ll gladly help you get started.


Back to top

Built with extensive integration tests and serious care for developer happiness.
© 2018-2025 Code Happy, LLC.

Page last modified: Dec 31 2025 at 09:49 PM.

Edit this page on GitHub.