You call an API and get back a number like 1700000000 instead of a date. Or a log shows 2023-11-14T22:13:20Z and you just want the seconds. That number is a Unix timestamp. This post explains what it is and how to flip between the two forms.
1. What is a Unix timestamp
A Unix timestamp (or epoch time) is the number of seconds since 1970-01-01 00:00:00 UTC (the "Unix epoch"). It is a single plain integer, which makes it perfect for storage and math — compare two times by subtracting two numbers.
Note: some systems count milliseconds (13 digits, e.g. 1700000000000). If your timestamp looks too long, divide by 1000.
2. Why systems love timestamps
Human date strings are messy: time zones, formats (Y-m-d vs m/d/Y), and locale. A timestamp is unambiguous and sortable. Databases, APIs and JWT tokens almost always store time as epoch seconds.
3. Convert a timestamp to a date
Take 1700000000: in UTC that is 2023-11-14 22:13:20. Your local time zone shifts it (e.g. UTC+8 shows the next morning). The conversion is just "epoch + N seconds = calendar date".
With Jisubao's tool: paste the seconds, click Timestamp → Date, and read the result. It runs locally in your browser.
4. Convert a date to a timestamp
Pick a date-time in the tool, click Date → Timestamp, and get the seconds. Great when you need to set a cache TTL, a token expiry, or a scheduled job.
5. Common pitfalls
- Time zone confusion: a timestamp is UTC; the displayed date depends on your zone. Always state the zone when comparing.
- Seconds vs milliseconds: a 10-digit number is seconds, 13-digit is milliseconds.
- Leap seconds: ignored by Unix time; usually irrelevant for apps.
👉 Try it now: Jisubao Timestamp Converter →