Epoch to Date & Swift Converter

Unix Timestamp to Date Converter for Swift

Convert epoch timestamps (seconds & milliseconds) to human UTC/Local dates and produce instant Date(timeIntervalSince1970:) Swift code.

Current Unix Epoch Time:
1728734400
Seconds since Jan 01 1970 (UTC)
UTC Time
Sat, 12 Oct 2024 12:00:00 GMT
Local Time
Sat Oct 12 2024 13:00:00 GMT+0100 (British Summer Time)
ISO 8601 (RFC 3339)
2024-10-12T12:00:00.000Z
Relative to Current Time
now
Swift timeIntervalSince1970
let date = Date(timeIntervalSince1970: 1728734400.0)
// Sat, 12 Oct 2024 12:00:00 GMT
Apple Cocoa Epoch (2001)
// Apple Reference Date (since Jan 1, 2001 00:00:00 UTC)
let appleEpochSec = 750427200.0
let date = Date(timeIntervalSinceReferenceDate: appleEpochSec)

Epoch Dates in the Apple Ecosystem

Unix Epoch (1970)

Standard seconds elapsed since midnight UTC on January 1, 1970. Used by REST APIs, JWT tokens, and Unix databases.

Apple Cocoa Epoch (2001)

Apple Core Foundation & Foundation frameworks internally use seconds since midnight UTC on January 1, 2001 via timeIntervalSinceReferenceDate.

Seconds vs Milliseconds

JavaScript APIs and Java servers often pass 13-digit millisecond timestamps. Swift requires division by 1000 before passing into Date(timeIntervalSince1970:).

Thorous icon

Build full iPhone apps without touching Xcode

Enjoying this free Timestamp Converter? Thorous turns your natural language prompts into compiled native SwiftUI apps, with real-time iOS simulator streaming and visual on-screen editing.

Native Mac app · macOS 14 Sonoma or later · Apple silicon & Intel