Podsumowanie
Timezone conversion translates a local time in one timezone to the equivalent local time in another. The world is divided into timezone regions, each defined by a UTC offset that may change seasonally due to Daylight Saving Time (DST). The IANA Time Zone Database — maintained by ICANN and used by every major operating system and browser — is the authoritative source for these rules.
Jak to działa
Every timezone is defined by its UTC offset — the number of hours and minutes ahead of or behind Coordinated Universal Time (UTC). To convert a time from one zone to another:
- Determine the UTC offset of the source timezone on the given date
- Determine the UTC offset of the target timezone on the given date
- Calculate the difference and apply it to the source time
The date matters because many timezones observe Daylight Saving Time (DST), which shifts the UTC offset by one hour (typically) during summer months. For example, London is UTC+0 in winter (GMT) but UTC+1 in summer (BST).
Non-standard offsets
Most timezones use whole-hour offsets, but several do not:
| Timezone | UTC Offset | Region |
|---|---|---|
| India Standard Time (IST) | UTC+5:30 | India |
| Nepal Time (NPT) | UTC+5:45 | Nepal |
| Chatham Islands | UTC+12:45 | New Zealand |
| Marquesas Islands | UTC-9:30 | French Polynesia |
Wzór
Where
Business hour overlap
To find when business hours (typically 9:00–17:00) overlap across multiple timezones:
- Convert each timezone’s business hours to UTC
- Find the intersection of all UTC ranges
- The number of overlapping UTC hours is the business hour overlap
Where
Przykład obliczeniowy
London 12:00 noon → New York (January 15)
Source offset (London, January)
= 0 min
Target offset (New York, January)
= −300 min
Offset difference
= −5:00
Target time
= 07:00
Result
London 12:00 = New York 07:00 EST
Business hour overlap: London + New York (January)
London business hours in UTC
= 09:00–17:00 UTC
New York business hours in UTC
= 14:00–22:00 UTC
Overlap
= 3 hours
Result
3 overlapping business hours (14:00–17:00 UTC = 2–5 PM London = 9 AM–12 PM New York)
Objaśnienie danych wejściowych
- From city — the source timezone city. Defaults to the user’s detected timezone.
- To city — the target timezone city.
- Time — the local time in the source timezone to convert.
- Additional cities — extra timezones for multi-zone comparison and meeting planning.
Objaśnienie wyników
- Converted time — the equivalent local time in the target timezone.
- Offset difference — how many hours/minutes ahead or behind the target is from the source.
- Day offset — whether the conversion crosses a date boundary (+1 day or −1 day).
- Business hour overlap — how many hours of standard working time (9–5) overlap between all selected timezones.
- 24-hour timeline — a visual strip showing which hours are business hours in each timezone and where they overlap.
Założenia i ograniczenia
- Business hours are assumed to be 9:00–17:00 local time. Many industries and cultures use different working hours.
- DST transitions — the calculator is DST-aware via the browser’s Intl API (backed by the IANA TZ Database), but the exact DST transition rules can change when governments update their policies.
- City list — the calculator includes 22 popular cities. Timezones not represented by a city in the list cannot currently be selected.
- Half-hour and 45-minute offsets — fully supported (India UTC+5:30, Nepal UTC+5:45, etc.).
- Historical dates — conversions use the current date; historical timezone rules are not modelled.
Weryfikacja
| Test case | Input | Expected | Source |
|---|---|---|---|
| London → New York (winter) | 12:00, Jan 15 | 07:00 (−5:00) | timeanddate.com |
| London → Mumbai (winter) | 12:00, Jan 15 | 17:30 (+5:30) | IANA: IST = UTC+5:30 |
| London → Tokyo (winter) | 12:00, Jan 15 | 21:00 (+9:00) | IANA: JST = UTC+9 |
| London → Kathmandu | 12:00, Jan 15 | 17:45 (+5:45) | IANA: NPT = UTC+5:45 |
| Business overlap: London + NYC | 9–17, Jan 15 | 3 hours | Calculated from offsets |
| Business overlap: London + Dubai | 9–17, Jan 15 | 4 hours | Calculated from offsets |