Dev Tools

How to Convert Between Timezones — Complete Guide

Time is one of the most fundamental concepts in computing and daily life — yet converting between timezones trips up developers, remote workers, and travelers alike. This guide explains how timezones actually work, how to convert between them manually, and the important caveats to keep in mind (especially around Daylight Saving Time).

Try our free tool: Timezone Converter — World Clock →

What is UTC?

UTC (Coordinated Universal Time) is the primary time standard for the world. It is the successor to GMT (Greenwich Mean Time) and, unlike GMT, is defined by atomic clocks rather than astronomical observation. All timezones are defined as fixed offsets from UTC.

UTC itself never changes — it does not observe Daylight Saving Time. This makes it the ideal reference point for computers and databases. When you see a timestamp like 2026-03-10T14:00:00Z, the trailing Z means UTC.

How UTC offsets work

Every timezone has a UTC offset — the number of hours (and sometimes minutes) to add or subtract from UTC to get local time. The notation is UTC+X or UTC−X.

To convert from one timezone to another, simply compute the UTC representation first, then apply the destination offset:

  1. Start with the local time in the source timezone.
  2. Subtract its UTC offset to get UTC time.
  3. Add the destination timezone's UTC offset.

Worked example: New York → Tokyo

It's 9:00 AM EST (UTC−5) in New York. What time is it in Tokyo (JST, UTC+9)?

  1. 9:00 AM − (−5h) = 9:00 + 5 = 14:00 UTC
  2. 14:00 UTC + 9h = 23:00 JST

So when it's 9 AM in New York, it's 11 PM in Tokyo — and technically the next day if we cross midnight.

Daylight Saving Time (DST) — the timezone trap

DST is why timezone conversion is hard. Many countries advance their clocks by 1 hour in summer to take advantage of longer daylight. This means:

City Winter offset Summer offset Observes DST?
New YorkUTC−5UTC−4Yes
MadridUTC+1UTC+2Yes
LondonUTC+0UTC+1Yes
TokyoUTC+9UTC+9No
DubaiUTC+4UTC+4No
MumbaiUTC+5:30UTC+5:30No

During the US DST transition period (when the US has changed clocks but Europe hasn't yet, or vice versa), the difference between New York and Madrid shifts from 6 hours to 5 or 7 hours for a few weeks. Always use a tool or IANA timezone database rather than hardcoding offsets.

IANA timezone database

Computers represent timezones using the IANA timezone database (also called the "tz database" or "Olson database"). Instead of UTC offsets, timezones are identified by region/city names like America/New_York, Europe/Madrid, or Asia/Tokyo. This is important because:

Avoid using abbreviations like "EST" or "CET" in code — they are ambiguous (EST means different things in the US and Australia). Always use IANA identifiers.

Converting timezones in code

Language Example
JavaScriptnew Intl.DateTimeFormat('en', { timeZone: 'Asia/Tokyo' }).format(new Date())
Pythonfrom zoneinfo import ZoneInfo; dt.astimezone(ZoneInfo('Asia/Tokyo'))
JavaZonedDateTime.now(ZoneId.of("Asia/Tokyo"))
Goloc, _ := time.LoadLocation("Asia/Tokyo"); t.In(loc)
SQL (PostgreSQL)now() AT TIME ZONE 'Asia/Tokyo'

Tips for scheduling meetings across timezones

Ready to convert? Open Timezone Converter →