毫秒转日期
将编程语言常用的13位毫秒时间戳快速转换为可读日期。
Milliseconds → date & time
13 digits is typical today; fractional values are rounded to the nearest millisecond.
—
计算原理
- Epoch milliseconds count milliseconds since
1970-01-01T00:00:00Z, the unit used by Java, JavaScript, .NET and most web APIs. A current value has 13 digits (≈ 1.7 × 10¹²). - The value is rounded to the nearest whole millisecond when it has a fraction (JavaScript Date precision is 1 ms), then decoded to an exact UTC instant.
- The same instant is shown in UTC and your local zone, plus the equivalent 10-digit epoch seconds for cross-checking.
使用提示
- This page always reads input as milliseconds. A 10-digit value like
1700000000is seconds; feeding it here produces a 1970-era date. Use the Unix Timestamp Converter when the unit is uncertain. - UTC and local dates can differ by a day around midnight; both are shown to make that visible instead of surprising.
- The full JavaScript Date range (±8.64×10¹⁵ ms) is supported; beyond it the value is rejected with an explanation.
相关工具
常见问题解答
Which systems use millisecond timestamps?
Java, JavaScript, .NET, and most web APIs and log formats. If your value has 13 digits and is around 1.7 trillion, it is almost certainly milliseconds.
Can I enter fractional milliseconds?
You can enter decimals, and the tool rounds to whole milliseconds explicitly. JavaScript Date precision is one millisecond, so finer detail cannot be represented.
Why is the result a day off from my log’s date?
Log viewers often show UTC while you expect local time (or vice versa). The converter shows both UTC and your local zone so the discrepancy is visible instead of confusing.