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).
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.
- UTC+0 — London in winter (GMT)
- UTC+1 — Madrid, Paris, Berlin in winter (CET)
- UTC+2 — Madrid, Paris, Berlin in summer (CEST) — same cities, different offset due to DST
- UTC−5 — New York in winter (EST)
- UTC+5:30 — India (IST) — a half-hour offset
- UTC+9 — Tokyo, Seoul (JST) — no DST
To convert from one timezone to another, simply compute the UTC representation first, then apply the destination offset:
- Start with the local time in the source timezone.
- Subtract its UTC offset to get UTC time.
- 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)?
- 9:00 AM − (−5h) = 9:00 + 5 = 14:00 UTC
- 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:
- The UTC offset of a timezone changes twice a year.
- The time difference between two DST-observing regions may stay constant, but between a DST region and a non-DST region it will change by ±1 hour.
| City | Winter offset | Summer offset | Observes DST? |
|---|---|---|---|
| New York | UTC−5 | UTC−4 | Yes |
| Madrid | UTC+1 | UTC+2 | Yes |
| London | UTC+0 | UTC+1 | Yes |
| Tokyo | UTC+9 | UTC+9 | No |
| Dubai | UTC+4 | UTC+4 | No |
| Mumbai | UTC+5:30 | UTC+5:30 | No |
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:
- It encodes historical DST transitions (some countries have changed their rules multiple times).
- It handles edge cases like countries that skipped a day when crossing the International Date Line.
- It is used by virtually all programming languages and operating systems.
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 |
|---|---|
| JavaScript | new Intl.DateTimeFormat('en', { timeZone: 'Asia/Tokyo' }).format(new Date()) |
| Python | from zoneinfo import ZoneInfo; dt.astimezone(ZoneInfo('Asia/Tokyo')) |
| Java | ZonedDateTime.now(ZoneId.of("Asia/Tokyo")) |
| Go | loc, _ := time.LoadLocation("Asia/Tokyo"); t.In(loc) |
| SQL (PostgreSQL) | now() AT TIME ZONE 'Asia/Tokyo' |
Tips for scheduling meetings across timezones
- Anchor on UTC. State meeting times in UTC to avoid ambiguity — everyone can convert to their local time.
- Watch the DST transition weeks. The US and Europe change clocks on different dates, so the overlap window shifts for 2–3 weeks twice a year.
- Know the non-DST zones. Japan, India, Dubai, and China don't change their clocks, so they're more predictable partners.
- US + Europe sweet spot: 14:00–17:00 UTC covers 9 AM–12 PM New York and 3 PM–6 PM Madrid.
- US + Asia sweet spot: Very hard — there is roughly a 12–14 hour difference. Early morning US (7 AM PST = 23:00 UTC) or late evening is usually the only overlap.