Date & Time Tools
Convert Unix timestamps, calculate exact date differences across timezones, explore time standards (UTC, ISO 8601, leap seconds, NTP), and see production code examples in JavaScript, Python, Java, Go, Rust, and Ruby.
Frequently Asked Questions
What is Unix time (Epoch time)?
Unix time is the number of seconds that have elapsed since January 1, 1970 at 00:00:00 UTC (the Unix epoch). It is the standard time representation used by most operating systems and programming languages. JavaScript uses milliseconds instead of seconds.
What is the difference between UTC and GMT?
UTC (Coordinated Universal Time) and GMT (Greenwich Mean Time) share the same current time for practical purposes. However, GMT is a timezone (used in the UK during winter), while UTC is a time standard — the reference point from which all other timezones are offset.
How do I handle timezones correctly?
Always store timestamps in UTC. Convert to the user's local timezone only at display time. Never do timezone math manually — use standard libraries like Intl.DateTimeFormat (JS), zoneinfo (Python), or java.time (Java). Avoid deprecated APIs like JavaScript's getTimezoneOffset() for complex scenarios.
What is ISO 8601 and why should I use it?
ISO 8601 is the international standard for date/time representation (e.g., 2024-03-27T14:30:00Z). It is unambiguous, sortable as strings, and universally parseable. Most REST APIs and JSON serializers default to ISO 8601. It supports timezone offsets, durations, and intervals.
What happens during a leap second?
A leap second is a one-second adjustment added to UTC to keep it aligned with Earth's rotation. Since 1972, 27 leap seconds have been added. They can cause software bugs — notable outages occurred at Reddit, LinkedIn, and Cloudflare in 2012 and 2016. Modern systems use 'leap smearing' to spread the extra second across several hours.
What is the 2038 problem (Y2K38)?
The Year 2038 problem affects systems that store time as a signed 32-bit integer. On January 19, 2038, the value will overflow from 2^31-1 to negative, breaking date calculations. Modern 64-bit systems (almost everything today) are immune. It mirrors the Y2K bug but for time storage rather than year display.
Explore More Tools
Discover other developer utilities in our labs
Related Resources
Learning
- Blog Posts — Deep dives on distributed systems timing
- Video Tutorials — Step-by-step guides
Tools
- All Labs — Explore more developer tools
- JWT Decoder — Decode JSON Web Tokens
- Toolbox — More developer utilities