Epoch and Unix Timestamp Conversion Guide
Convert between Unix timestamps, ISO 8601 dates, and human-readable formats across timezones.
Key Takeaways
- Unix timestamps — seconds since January 1, 1970 00:00:00 UTC — are the universal representation for points in time in computing.
- Always store and transmit timestamps in UTC.
- When converting a timestamp to a human-readable date, always specify the timezone: "March 1, 2024 19:00 EST" not just "March 1, 2024 19:00".
- Always include the timezone offset.
- ### Common Conversion Pitfalls Leap seconds: UTC has had 27 leap seconds since 1972, but Unix timestamps ignore them (a day is always 86,400 seconds).
Hash Generator
Generate SHA-1, SHA-256, SHA-384, SHA-512 hashes from text
Unix Timestamp Conversion
Unix timestamps — seconds since January 1, 1970 00:00:00 UTC — are the universal representation for points in time in computing. Converting between timestamps and human-readable dates requires careful timezone handling.
Timestamp Formats
Standard Unix timestamps are seconds since epoch (10 digits: 1709337600 = March 2, 2024 00:00:00 UTC). JavaScript and Java use milliseconds (13 digits: 1709337600000). Some systems use microseconds (16 digits) or nanoseconds (19 digits). When parsing an unknown timestamp, the digit count tells you the precision.
Timezone Handling
The single most common timestamp bug: treating a UTC timestamp as local time or vice versa. Always store and transmit timestamps in UTC. Convert to local time only for display. When converting a timestamp to a human-readable date, always specify the timezone: "March 1, 2024 19:00 EST" not just "March 1, 2024 19:00".
ISO 8601 Format
ISO 8601 is the standard string format: 2024-03-02T00:00:00Z (Z = UTC), 2024-03-01T19:00:00-05:00 (EST). Always include the timezone offset. The T separator between date and time is required. For date-only values, omit the time: 2024-03-02. This format sorts correctly as strings, which is why databases and APIs prefer it.
Common Conversion Pitfalls
Leap seconds: UTC has had 27 leap seconds since 1972, but Unix timestamps ignore them (a day is always 86,400 seconds). This means Unix timestamps are technically offset from TAI by 27 seconds. In practice, this rarely matters. The Year 2038 problem: 32-bit signed timestamps overflow on January 19, 2038. Use 64-bit timestamps in new systems.
Browser-Based Conversion
Client-side timestamp converters process entirely locally. Enter a Unix timestamp to see the human-readable date in UTC and your local timezone. Enter a date to get the Unix timestamp. Useful for debugging log entries, database records, and API responses where times are stored as numbers.
관련 도구
관련 포맷
관련 가이드
JSON vs YAML vs TOML: Choosing a Configuration Format
Configuration files are the backbone of modern applications. JSON, YAML, and TOML each offer different trade-offs between readability, complexity, and tooling support that affect your development workflow.
How to Format and Validate JSON Data
Malformed JSON causes silent failures in APIs and configuration files. Learn how to format, validate, and debug JSON documents to prevent integration errors and improve readability.
Base64 Encoding: How It Works and When to Use It
Base64 converts binary data into ASCII text, making it safe for transmission through text-based systems. Learn when Base64 is the right choice and when alternatives like hex encoding or URL encoding are more appropriate.
Best Practices for Working with Unix Timestamps
Unix timestamps provide a language-agnostic way to represent points in time, but they come with pitfalls around time zones, precision, and the 2038 problem. This guide covers best practices for storing and converting timestamps.
Troubleshooting JWT Token Issues
JSON Web Tokens are widely used for authentication but can be frustrating to debug. This guide covers common JWT problems including expiration errors, signature mismatches, and payload decoding issues.