EpochTools
Mobile

Unix Timestamps in Kotlin

Modern Kotlin / JVM timestamp handling.

Complete Kotlin Recipe

import java.time.Instant

fun main() {
    // 1. Current timestamp
    val currentSec = Instant.now().epochSecond
    val currentMs  = System.currentTimeMillis()

    // 2. Convert timestamp (1710000000) to Instant
    val instant = Instant.ofEpochSecond(1710000000L)
    println(instant) // 2026-10-02T...Z
}

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

–