Mobile
Unix Timestamps in Swift
Apple Swift Foundation Date and ISO8601DateFormatter.
Complete Swift Recipe
import Foundation
// 1. Current timestamp
let currentSec = Int(Date().timeIntervalSince1970)
// 2. Convert timestamp (1710000000) to Date
let date = Date(timeIntervalSince1970: TimeInterval(1710000000))
let formatter = ISO8601DateFormatter()
print(formatter.string(from: date))
Test With Live Converter
Epoch → Human Date
Paste any Unix timestamp. The unit is auto-detected from its magnitude.
Auto-detects seconds, milliseconds, microseconds, or nanoseconds. Example: 1735689600
Detected:Auto (Seconds)
UTC ISO 8601
–
Local — auto
–
RFC 2822 / GMT
–
Seconds Value
–
Relative Time
–