🌍 Timezone Converter
Master safe timezone conversions with real-world examples. Learn the difference between naive and aware datetimes, and discover why "just add/subtract hours" is a recipe for disaster.
🔄 Interactive Converter
✅ Safe Conversion Result
Source Time
2025-09-11 14:30:00
America/New_York
Converted Time
2025-09-11 19:30:00
Europe/London
UTC Reference
2025-09-11 18:30:00 UTC
Always store this in your database
🎯 Common Scenarios
Safe Conversion Code Examples
// ✅ Recommended: Use Luxon for timezone conversions
import { DateTime } from 'luxon';
// Parse with explicit timezone
const sourceTime = DateTime.fromISO("2025-09-11T14:30:00", {
zone: "America/New_York"
});
// Convert to target timezone
const targetTime = sourceTime.setZone("Europe/London");
// Always get UTC for storage
const utcTime = sourceTime.toUTC();
console.log('Source:', sourceTime.toISO());
console.log('Target:', targetTime.toISO());
console.log('UTC:', utcTime.toISO());
// ❌ Avoid: Manual timezone math
const badConversion = new Date("2025-09-11T14:30:00");
// This doesn't specify timezone and will use local system timezone!
// ✅ Alternative: Day.js with timezone plugin
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
import timezone from 'dayjs/plugin/timezone';
dayjs.extend(utc);
dayjs.extend(timezone);
const source = dayjs.tz("2025-09-11T14:30:00", "America/New_York");
const target = source.tz("Europe/London");
const utc = source.utc();