Back to this category
Live
Unix timestamp converter
Convert Unix timestamps and datetimes in the selected timezone. Tap the live values to copy.
Current timestamp
Tap a value above to copy
Timestamp → datetime
07/21/2026, 10:14:09
Datetime → timestamp
Datetime is parsed in the timezone selected above (shared with timestamp → date)
Unix seconds
1784600049
Unix milliseconds
1784600049000
China Standard Time & historical DST
China used daylight saving time from 1986 through 1991 (clocks advanced one hour in summer). DST ended nationwide after April 1992.
Runtime libraries (e.g. JDK Asia/Shanghai rules) may differ by version for historical DST edges—verify with an authoritative tz database for compliance workloads.
Get current Unix timestamp (snippets)
| Language | Sample | |
|---|---|---|
| JavaScript | Math.floor(Date.now() / 1000) | |
| Python | import time int(time.time()) | |
| Go | time.Now().Unix() | |
| Java | System.currentTimeMillis() / 1000 | |
| PHP | time(); | |
| Shell | date +%s | |
| MySQL | SELECT UNIX_TIMESTAMP(NOW()); | |
| SQLite | SELECT strftime('%s', 'now'); | |
| Ruby | Time.now.to_i | |
| C# | DateTimeOffset.UtcNow.ToUnixTimeSeconds(); | |
| Swift | Int(Date().timeIntervalSince1970) | |
| Dart | (DateTime.now().millisecondsSinceEpoch / 1000).truncate() |