UNIX Timestamp Converter
Convert between UNIX timestamps and human-readable dates. Auto-detects seconds vs milliseconds, supports UTC and local timezone switching.
Current Timestamp
1777641181sec
โฑ Timestamp โ Date / Time
๐ Date / Time โ Timestamp
Get Timestamp in Popular Languages
| Language | Method |
|---|---|
| Java | (int) (System.currentTimeMillis() / 1000) |
| JavaScript | Math.round(new Date().getTime()/1000) |
| .NET / C# | (int)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds |
| Golang | int32(time.Now().Unix()) |
| PHP | time() |
| Perl | time |
| Python | time.time() |
| Ruby | Time.now.to_i |
| Swift | NSDate().timeIntervalSince1970 |
| MySQL | SELECT unix_timestamp(now()) |
| PostgreSQL | SELECT extract(epoch FROM now()) |
| SQL Server | SELECT DATEDIFF(s, '1970-01-01 00:00:00', GETUTCDATE()) |
| Unix / Linux / macOS | date +%s |