Millisecond timestamp batch conversion
🕒 Convert timestamp to date
💡 Instructions for use
- The two input boxes can be filled in at the same time: "Timestamp → Date" for timestamp, "Date → Timestamp" for date and time, and the results will be output in order.
- The unit is automatically recognized and judged by digits: 10 digits are regarded as seconds and 13 digits are regarded as milliseconds; you can also manually lock the unit to avoid treating milliseconds as seconds.
- Time zone conversion includes daylight saving time rules. London, Paris, New York, and Los Angeles will automatically shift by one hour during daylight saving time.
- The date supports three writing methods: 2024-01-01 08:00:00, 2024/01/01 08:00 and 2024-01-01. The default time is partially filled with 00:00:00.
Millisecond timestamp conversion handles the 13-digit value often given by JavaScript and Java: while converting the date and time, it also gives a half-size second-level value for easy comparison.
Conversion relationship between seconds and milliseconds
Millisecond timestamp = second-level timestamp × 1000. For example, 1735689600 seconds corresponds to 1735689600000 milliseconds. Both represent the same moment, but have different precisions. The tool outputs two values for each input at the same time, making it easy to copy to different environments.
The three most common types of confusion
- Think of 13 milliseconds as seconds: the result will be tens of thousands of years in the future, and the anomaly will be visible at a glance.
- Think of 10-digit seconds as milliseconds: the result falls somewhere around 1970, which is equally easy to identify.
- The unit is not unified when passing across languages: it is recommended to write milliseconds or seconds in the field name.
If you are not sure about the unit, leave the drop-down box in "Automatic Recognition": the tool will judge by digits, 10 digits are considered seconds, and 12 digits and above are considered milliseconds. Note that JavaScript's Date.now() returns milliseconds, while most server interfaces return seconds.
Millisecond-level timestamps have three more digits than second-level timestamps, and are commonly used in front-end and logging systems. If you forget to divide by a thousand when converting, you will get a result of tens of thousands of years.
The judgment method is simple: look at the number of digits. The tenth digit is usually seconds, and the thirteenth digit is usually milliseconds. If you are not sure, you can turn it once per second to see if the result falls in a reasonable year.
Manually locking the unit to "milliseconds" can force the 10-digit value to be interpreted as milliseconds for comparison and troubleshooting.
📖 Glossary
- Unix timestamp
- The number of seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of time zone, the same instant in any time zone is the same value.
- UTC
- Coordinated Universal Time is the world's unified time base; the local time of each time zone is obtained from its offset.
- time zone
- Time zones on the earth divided by longitude, for example, Beijing time is UTC+8 and New York time is UTC-5.
- daylight saving time
- The system of moving clocks forward one hour in summer in some areas will affect London, Paris, New York and other places. The conversion needs to be judged based on the date.
- Second level timestamp
- Timestamp in seconds, usually 10 digits, for example 1735689600.
- Millisecond timestamp
- A timestamp in milliseconds, usually a 13-digit number equal to the timestamp in seconds multiplied by 1000.
- ISO 8601
- International standard date and time writing, in the form of 2025-01-01T00:00:00.000Z, with Z at the end representing UTC.
- timestamp overflow
- The 32-bit system uses signed integers to store second-level timestamps. The upper limit corresponds to 2038-01-19. If it is exceeded, it will overflow, so the new system uses 64-bit instead.
- local time
- The time displayed according to the local time zone; the same timestamp displays different local times in different time zones.
- timestamp precision
- Second-level precision is used in most businesses; front-end JavaScript often gives milliseconds, while logs and databases mostly give seconds.
🔗 All keywords and tutorials
❓ FAQ
- How to read 13-digit timestamp?
- First divide by 1000 to get the second-level timestamp, and then convert it to date and time; the tool will directly give the result, no need to divide manually.
- Why are the timestamp digits returned by the interface inconsistent??
- Depends on the implementation language and field definition: JavaScript is used to milliseconds, and many backend and database fields use seconds. When accessing, it needs to be judged by document or number of digits.