Time & security
Unix Timestamp Converter
Convert between Unix timestamps and dates with time zone support and batch conversion.
Timestamp → date and time
Date and time → timestamp
Batch conversion
One timestamp per line. Spaces, commas and semicolons also work.
About timestamps
What a timestamp is
A Unix timestamp counts the seconds since 1970-01-01 00:00:00 UTC, ignoring leap seconds. It describes an absolute instant and has no time zone; a time zone is only needed to render it as a clock reading.
Seconds or milliseconds
Precision differs between stacks: Unix tools and most HTTP APIs use seconds, while Date.now() in JavaScript and currentTimeMillis() in Java use milliseconds. The 1000x gap shifts dates by decades, so confirm the unit first.
Get the current timestamp in each language
Math.floor(Date.now() / 1000) Math.floor(new Date().getTime() / 1000) import time
int(time.time()) Instant.now().getEpochSecond() time.Now().Unix() SystemTime::now()
.duration_since(UNIX_EPOCH)?
.as_secs() time() Time.now.to_i #include <time.h>
time_t now = time(NULL); DateTimeOffset.UtcNow.ToUnixTimeSeconds() Int(Date().timeIntervalSince1970) System.currentTimeMillis() / 1000 date +%s SELECT UNIX_TIMESTAMP(NOW()) SELECT strftime('%s', 'now') os.time() Daylight saving and time zone data
Time zone offsets change by legislation rather than staying fixed. China observed daylight saving from 1986 to 1991, so historical instants in Asia/Shanghai have a UTC+09:00 offset. Browsers and runtimes rely on their own time zone database (tzdata) to apply such rules, which is why the same timestamp can render differently across JDK versions or operating systems. This page uses the time zone database built into your browser.