Compare and convert time between multiple global time zones. Real-time offsets and DST support.
Timezones are a political construct, not just a geographical one. Countries change their time offsets and Daylight Saving Time (DST) rules frequently.
To handle this chaos, all modern software relies on the IANA Time Zone Database (tzdb). This database tracks every historical and current timezone rule for the entire planet. When you select a timezone like America/New_York, the browser engine uses this database to instantly know if DST is active on the specific date you've selected.
A common mistake in programming is storing timezones as fixed offsets (e.g., UTC-5 for New York). This is fundamentally flawed.
New York is UTC-5 in the winter, but UTC-4 in the summer due to Daylight Saving Time. If you schedule a meeting in July using a hardcoded UTC-5 offset, everyone will show up an hour late. You must always store the named region (America/New_York) and let the engine calculate the offset dynamically based on the target date.
UTC (Coordinated Universal Time) is the global standard baseline for time. It never observes Daylight Saving Time and never changes.
Best practice for databases is to instantly convert all timestamps to UTC the moment they are saved, and only convert them back to local time (like Asia/Kolkata or Europe/London) at the exact moment they are displayed to the user on the screen.
Why should you never store a timezone purely as an offset like 'UTC-5' for a future calendar event?