Timestamp Converter
Convert between Unix timestamps and dates down to milliseconds, with time zones
当前时间戳(秒)
-
当前时间戳(毫秒)
-
北京时间
-
UTC 时间
-
时间戳 → 日期
日期 → 时间戳
多语言代码
About this tool
A timestamp is the number of seconds since 00:00:00 UTC on 1 January 1970, the Unix epoch, ignoring leap seconds. It is the usual time format in code and shows up in logging, API signatures, database storage and cache expiry.
- Live panel: current second and millisecond timestamps plus UTC and local time, refreshed every second
- Timestamp to date: seconds or milliseconds detected automatically, with UTC, ISO 8601, RFC 2822, weekday and relative time such as 3 days ago
- Date to timestamp: a visual date picker that outputs seconds or milliseconds
- Code snippets: timestamp code for 16 languages including JavaScript, Python, PHP, Java, Go, Shell, C# and Ruby, one click to copy
When to use it
- Debugging timestamp parameters in an API
- Converting and comparing database time fields
- Restoring readable times while reading logs
- Grabbing a timestamp snippet for a language quickly
Timestamp notes
- Seconds vs milliseconds: 10 digits means seconds, 13 means milliseconds; Java and JavaScript often use milliseconds while PHP and Python often use seconds
- Unix epoch: the count starts at 1970-01-01 00:00:00 UTC, and 32-bit systems overflow in 2038
- Time zones: the timestamp itself is UTC, so the same value shows different local times
- Typical range: current values are near 1700000000 in seconds, so digit count tells you the unit