Working across timezones is a modern reality. Whether you're scheduling international meetings, deploying global applications, or coordinating with remote teams, understanding timezones is essential.
Why Timezones Exist
The Earth rotates 360° in 24 hours, or 15° per hour. Timezones divide the world into regions that observe the same standard time, roughly following longitude lines.
Before timezones, every city had its own local solar time. Noon was when the sun was highest. This worked until railroads and telegraphs needed synchronized schedules across distances.
UTC: The Universal Reference
UTC (Coordinated Universal Time) is the primary time standard worldwide. It's:
- Not affected by daylight saving
- The reference point for all timezones
- Based on atomic clocks (highly accurate)
GMT (Greenwich Mean Time) is often used interchangeably with UTC, but technically:
- GMT is a timezone (Britain's winter time)
- UTC is a time standard
For practical purposes, UTC = GMT.
Timezone Offsets Explained
Timezones are expressed as offsets from UTC:
UTC-5 = 5 hours behind UTC (e.g., US Eastern Standard Time)
UTC+0 = Same as UTC (e.g., GMT, Iceland)
UTC+5:30 = 5.5 hours ahead of UTC (e.g., India)
UTC+9 = 9 hours ahead of UTC (e.g., Japan)
| Timezone | UTC Offset | Example Cities |
|---|---|---|
| PST | UTC-8 | Los Angeles, Vancouver |
| EST | UTC-5 | New York, Toronto |
| GMT/UTC | UTC+0 | London, Lisbon |
| CET | UTC+1 | Paris, Berlin |
| IST | UTC+5:30 | Mumbai, Delhi |
| CST (China) | UTC+8 | Beijing, Shanghai |
| JST | UTC+9 | Tokyo |
| AEDT | UTC+11 | Sydney (summer) |
Daylight Saving Complications
Daylight Saving Time (DST) shifts clocks forward in spring and back in fall:
US Pacific:
- Standard (PST): UTC-8 (November - March)
- Daylight (PDT): UTC-7 (March - November)
UK:
- Standard (GMT): UTC+0 (October - March)
- Daylight (BST): UTC+1 (March - October)
Problems DST Causes
- Same offset, different times: UTC-5 could be EST or CDT (different places)
- Transition days: Clocks skip or repeat hours
- Not universal: Many places don't observe DST
- Different dates: Northern and Southern hemispheres switch opposite directions
2024-03-10 02:30 America/New_York → DOESN'T EXIST
(Clocks jump from 2:00 to 3:00)
2024-11-03 01:30 America/New_York → AMBIGUOUS
(Clock goes from 2:00 back to 1:00)
Best Practices for DST
- Store all times in UTC
- Use timezone-aware datetime libraries
- Never schedule important events during DST transitions (2-3 AM local)
- Test your code with DST transitions
Common Timezone Abbreviations
| Abbrev | Full Name | UTC Offset |
|---|---|---|
| UTC | Coordinated Universal Time | +0 |
| GMT | Greenwich Mean Time | +0 |
| EST | Eastern Standard Time | -5 |
| EDT | Eastern Daylight Time | -4 |
| CST | Central Standard Time | -6 |
| PST | Pacific Standard Time | -8 |
| PDT | Pacific Daylight Time | -7 |
| CET | Central European Time | +1 |
| IST | Indian Standard Time | +5:30 |
| JST | Japan Standard Time | +9 |
| AEST | Australian Eastern Standard | +10 |
Warning: Abbreviations can be ambiguous (CST = Central Standard Time US OR China Standard Time).
Use IANA timezone names for unambiguous identification:
America/New_YorkEurope/LondonAsia/Tokyo
Converting Between Timezones
The Easy Way (UTC as Intermediary)
- Convert source time to UTC
- Convert UTC to target timezone
// New York to Tokyo
const nyTime = new Date('2024-01-15T10:00:00-05:00');
console.log(nyTime.toLocaleString('en-US', { timeZone: 'Asia/Tokyo' }));
// "1/16/2024, 12:00:00 AM"
Mental Math Shortcuts
US time to UTC:
- Eastern: Add 5 (winter) or 4 (summer)
- Pacific: Add 8 (winter) or 7 (summer)
UTC to other zones:
- London: Same (winter) or +1 (summer)
- Paris: +1 (winter) or +2 (summer)
- India: +5:30
- Tokyo: +9
Example Calculation
New York (EST, UTC-5) to London (GMT, UTC+0):
New York: 10:00 AM EST
Add 5 hours to get UTC: 3:00 PM UTC
London is UTC+0: 3:00 PM GMT
Scheduling Across Timezones
Finding Overlap
For a meeting between New York, London, and Tokyo:
New York (EST): Business hours 9 AM - 6 PM
London (GMT): Business hours 9 AM - 6 PM (4 AM - 1 PM NYC)
Tokyo (JST): Business hours 9 AM - 6 PM (7 PM - 4 AM NYC)
There's essentially no overlap during business hours! Solutions:
- Rotate meeting times
- Record for async viewing
- Find tolerable early/late times
The 8 AM Rule
8 AM in one timezone often works as an extreme but acceptable time for others:
8 AM New York = 1 PM London = 10 PM Tokyo
8 AM London = 3 AM New York = 5 PM Tokyo
Storing Times in Databases
Best Practice: Store UTC
-- Good: Store in UTC
INSERT INTO events (name, start_time_utc)
VALUES ('Meeting', '2024-01-15 15:00:00');
-- Display with conversion
SELECT start_time_utc AT TIME ZONE 'America/New_York' as local_time;
Store the Timezone Too
When the local time matters (e.g., "meeting at 2 PM local"), store both:
CREATE TABLE events (
start_time_utc TIMESTAMP WITH TIME ZONE,
timezone VARCHAR(50) -- 'America/New_York'
);
Best Practices for Global Apps
1. Always Store UTC
from datetime import datetime, timezone
# Store this
utc_time = datetime.now(timezone.utc)
2. Display in User's Timezone
const userTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
date.toLocaleString('en-US', { timeZone: userTimezone });
3. Use Timezone-Aware Libraries
- JavaScript:
Intl.DateTimeFormat,Luxon,date-fns-tz - Python:
pytz,zoneinfo(3.9+) - Java:
java.time.ZonedDateTime
4. Show Timezone in UI
Always show the timezone when displaying times:
Meeting: January 15, 2024 at 3:00 PM EST (UTC-5)
5. Let Users Set Preferences
Don't just detect—let users override:
// Detect
const detected = Intl.DateTimeFormat().resolvedOptions().timeZone;
// But allow override
const preferred = user.preferences.timezone || detected;
6. Handle Edge Cases
- Times that don't exist (DST spring forward)
- Times that occur twice (DST fall back)
- Countries that change timezone rules
Timezone-Aware Programming
JavaScript
// Get current time in specific timezone
const options = {
timeZone: 'America/New_York',
year: 'numeric', month: 'long', day: 'numeric',
hour: '2-digit', minute: '2-digit',
timeZoneName: 'short'
};
new Date().toLocaleString('en-US', options);
// "January 15, 2024, 10:00 AM EST"
// Convert between timezones
const utc = new Date('2024-01-15T15:00:00Z');
utc.toLocaleString('en-US', { timeZone: 'Asia/Tokyo' });
Python
from datetime import datetime
from zoneinfo import ZoneInfo # Python 3.9+
# Create timezone-aware datetime
utc_time = datetime.now(ZoneInfo('UTC'))
# Convert to another timezone
tokyo_time = utc_time.astimezone(ZoneInfo('Asia/Tokyo'))
# Parse with timezone
from datetime import datetime
dt = datetime.fromisoformat('2024-01-15T10:00:00-05:00')
Summary
Working with timezones requires care:
- UTC is your friend: Store and transmit in UTC
- Display locally: Convert for display in user's timezone
- DST is tricky: Test edge cases, avoid scheduling during transitions
- Use IANA names:
America/New_York, notEST - Show the timezone: Always include timezone in displayed times
Master timezones and you'll build globally-friendly applications.
Need to convert timezones? Try our Timezone Converter!