A complete guide to using a 10 digit timestamp converter. Learn what 10‑digit Unix epoch seconds are, how to convert them to readable dates, avoid common mistakes, and apply best practices with real examples and code.
A 10-digit timestamp converter turns Unix epoch seconds into readable dates (and back again) with absolute precision. If you’ve ever stared at a number like 1712345678 and wondered what human date it represents, this guide is for you.
Quick answer
- A 10-digit timestamp is Unix time in seconds since 1970-01-01T00:00:00Z (UTC).
- Example: 1700000000 → 2023-11-14 22:13:20 UTC.
- 10 digits = seconds. 13 digits = milliseconds. 19 digits = nanoseconds.
- Always convert in UTC to avoid DST surprises; format as ISO 8601/RFC 3339 for clarity.
- ZenixTools auto-detects seconds vs milliseconds, handles time zones, and gives copy-ready formats.
A 10-digit timestamp is Unix time counted in seconds since the Unix epoch: 1970-01-01T00:00:00Z (UTC), ignoring leap seconds by design. It’s a compact, language-agnostic way to represent moments in time.
Key facts:
Range landmarks:
Examples:
Why the confusion? Many APIs use milliseconds (13 digits) for finer precision, while others use seconds (10 digits). Confusing these units creates dates in 1970 or the far future.
Unix timestamps show up across the stack:
A reliable 10-digit timestamp converter prevents:
Pro tips:
Rule of thumb: If the date shows 1970 or far future, you likely mixed seconds and milliseconds.
Common formats you can copy from ZenixTools:
Best practice: Prefer ISO 8601/RFC 3339 for cross-system clarity.
Use these drop-in snippets to convert reliably. Always specify UTC when formatting/parsing.
// 10-digit seconds → Date (UTC display using toISOString)
const seconds = 1712345678;
const dateFromSeconds = new Date(seconds * 1000);
console.log(dateFromSeconds.toISOString()); // e.g., 2024-04-05T22:34:38.000Z
// 13-digit ms → Date
const ms = 1712345678000;
console.log(new Date(ms).toISOString());
// Date → 10-digit seconds (UTC)
const date = new Date('2026-07-01T12:34:38Z');
const epochSeconds = Math.floor(date.getTime() / 1000);
console.log(epochSeconds);
// Safety note: For 19-digit ns or when beyond 2^53-1, use BigInt
const ns = 1712345678000000000n;
const secFromNs = ns / 1000000000n; // BigInt division
from datetime import datetime, timezone
# 10-digit seconds → datetime (UTC)
seconds = 1712345678
dt = datetime.fromtimestamp(seconds, tz=timezone.utc)
print(dt.isoformat()) # e.g., 2024-04-05T22:34:38+00:00
# 13-digit ms → datetime
ms = 1712345678000
dt_ms = datetime.fromtimestamp(ms / 1000, tz=timezone.utc)
print(dt_ms.isoformat())
# datetime → 10-digit seconds
iso = "2026-07-01T12:34:38+00:00"
parsed = datetime.fromisoformat(iso)
print(int(parsed.timestamp()))
# 10-digit seconds → human (UTC)
date -u -d @1712345678 '+%Y-%m-%dT%H:%M:%SZ'
# human → 10-digit seconds (UTC)
date -u -d '2026-07-01 12:34:38' +%s
# 10-digit seconds → DateTime (UTC)
[DateTimeOffset]::FromUnixTimeSeconds(1712345678).UtcDateTime
# Date → 10-digit seconds (UTC)
[DateTimeOffset]::Parse('2026-07-01T12:34:38Z').ToUnixTimeSeconds()
import java.time.*;
import java.time.format.DateTimeFormatter;
// 10-digit seconds → ZonedDateTime (UTC)
long seconds = 1712345678L;
ZonedDateTime zdt = Instant.ofEpochSecond(seconds).atZone(ZoneOffset.UTC);
System.out.println(zdt.format(DateTimeFormatter.ISO_INSTANT));
// Date → 10-digit seconds
long epochSec = ZonedDateTime.parse("2026-07-01T12:34:38Z").toEpochSecond();
System.out.println(epochSec);
package main
import (
"fmt"
"time"
)
func main() {
// 10-digit seconds → time.Time (UTC)
t := time.Unix(1712345678, 0).UTC()
fmt.Println(t.Format(time.RFC3339))
// Date → 10-digit seconds
tt, _ := time.Parse(time.RFC3339, "2026-07-01T12:34:38Z")
fmt.Println(tt.Unix())
// Milliseconds API
tms := time.UnixMilli(1712345678000).UTC()
fmt.Println(tms.Format(time.RFC3339Nano))
}
<?php
// 10-digit seconds → DateTimeImmutable (UTC)
$seconds = 1712345678;
$dt = (new DateTimeImmutable('@' . $seconds))->setTimezone(new DateTimeZone('UTC'));
echo $dt->format(DATE_ATOM), "\n"; // ISO 8601
// Date → 10-digit seconds
$iso = '2026-07-01T12:34:38+00:00';
$parsed = new DateTimeImmutable($iso);
echo $parsed->getTimestamp(), "\n";
# 10-digit seconds → Time (UTC)
t = Time.at(1712345678).utc
puts t.iso8601
# Date → 10-digit seconds
puts Time.iso8601('2026-07-01T12:34:38Z').to_i
using System;
// 10-digit seconds → DateTime (UTC)
var dt = DateTimeOffset.FromUnixTimeSeconds(1712345678).UtcDateTime;
Console.WriteLine(dt.ToString("o")); // ISO 8601
// Date → 10-digit seconds
var epoch = DateTimeOffset.Parse("2026-07-01T12:34:38Z").ToUnixTimeSeconds();
Console.WriteLine(epoch);
use chrono::{TimeZone, Utc};
// 10-digit seconds → DateTime<Utc>
let dt = Utc.timestamp_opt(1712345678, 0).single().unwrap();
println!("{}", dt.to_rfc3339());
// Date → 10-digit seconds
let parsed = chrono::DateTime::parse_from_rfc3339("2026-07-01T12:34:38Z").unwrap();
println!("{}", parsed.timestamp());
import Foundation
// 10-digit seconds → Date (UTC ISO string)
let seconds: TimeInterval = 1712345678
let date = Date(timeIntervalSince1970: seconds)
let iso = ISO8601DateFormatter()
iso.timeZone = TimeZone(secondsFromGMT: 0)
print(iso.string(from: date))
// Date → 10-digit seconds
let parsed = iso.date(from: "2026-07-01T12:34:38Z")!
print(Int(parsed.timeIntervalSince1970))
PostgreSQL:
-- 10-digit seconds → timestamptz (UTC)
SELECT to_timestamp(1712345678) AT TIME ZONE 'UTC';
-- timestamptz → 10-digit seconds
SELECT EXTRACT(EPOCH FROM TIMESTAMPTZ '2026-07-01 12:34:38+00')::bigint;
MySQL/MariaDB:
-- 10-digit seconds → datetime (session tz)
SELECT FROM_UNIXTIME(1712345678);
-- datetime → 10-digit seconds
SELECT UNIX_TIMESTAMP('2026-07-01 12:34:38');
SQLite:
-- 10-digit seconds → ISO string (UTC)
SELECT datetime(1712345678, 'unixepoch');
-- 13-digit ms → divide to seconds
SELECT datetime(1712345678000/1000, 'unixepoch');
BigQuery:
-- 10-digit seconds → TIMESTAMP (UTC)
SELECT TIMESTAMP_SECONDS(1712345678);
-- TIMESTAMP → 10-digit seconds
SELECT UNIX_SECONDS(TIMESTAMP '2026-07-01 12:34:38+00');
Snowflake:
-- 10-digit seconds → TIMESTAMP_NTZ/TZ (session dependent)
SELECT TO_TIMESTAMP(1712345678);
-- TIMESTAMP → 10-digit seconds
SELECT DATE_PART(EPOCH_SECOND, TO_TIMESTAMP('2026-07-01 12:34:38'))::BIGINT;
Excel (UTC):
# Seconds in A2 → DateTime (format cell as Custom: yyyy-mm-dd hh:mm:ss)
=(A2/86400)+DATE(1970,1,1)
# Milliseconds in A2 → DateTime
=(A2/1000/86400)+DATE(1970,1,1)
Excel local time zone offset (example UTC-4, adjust as needed):
=(A2/86400)+DATE(1970,1,1)+(-4/24)
Google Sheets (UTC):
= A2/86400 + DATE(1970,1,1)
Format the cell as Date time. For milliseconds: =A2/1000/86400 + DATE(1970,1,1).
ts=1712345678 in Nginx logs. Convert to UTC to align spikes with deploy times.{ "created_at": 1712345678 }. Confirm units (s vs ms) before parsing.iat and exp are seconds since epoch (UTC). Validate freshness precisely.Z or +00:00 when formatting/parsing. Specify IANA TZ for local views.2026-07-01T12:34:38Z communicates time and zone unambiguously.1700000000 maps to.Recommendations:
^-?\d{10}$ → seconds^-?\d{13}$ → milliseconds^-?\d{16}$ → microseconds^-?\d{19}$ → nanoseconds0 to 9 digits but still 10 total (e.g., 094... isn’t typical; avoid leading zeros)Z or offset when formattingEurope/Berlin) over ambiguous abbreviations (e.g., CET)| Method | Unit Auto-detect | Time Zones (IANA) | Copy-Ready Formats | Reverse Convert | Notes |
|---|---|---|---|---|---|
| ZenixTools | Yes (s/ms) | Yes (UTC, local, IANA) | ISO, RFC 3339, custom | Yes | Fast, zero-setup, shareable links |
| Manual CLI (date) | No | Limited by system | Custom via flags | Yes | Requires shell access, syntax varies |
| Browser Console | No | Browser TZ unless forced | Manual formatting | Yes | Quick but error-prone for units/TZ |
| Generic Online Converters | Sometimes | Varies | Varies | Sometimes | Quality inconsistent; verify accuracy |
Why ZenixTools wins: reliable auto-detection, explicit UTC handling, IANA zones, and one-click copy formats reduce mistakes and speed up incident response.
Q1) What is a 10-digit timestamp?
Q2) 10 digits or 13 digits — which do I have?
Q3) Should I convert in UTC or local time?
Q4) Does Unix time handle leap seconds?
Q5) What about negative values?
Q6) How do I convert in Excel/Sheets?
=(A2/86400)+DATE(1970,1,1) (format as Date Time). For ms: /1000/86400.=A2/86400 + DATE(1970,1,1) (format as Date Time).Q7) How do JWT iat and exp work?
Q8) Will the Year 2038 bug affect me?
Q9) Can I detect if a value is seconds or milliseconds automatically?
Q10) How do I get the current epoch seconds quickly?
date +%s. JS: Math.floor(Date.now()/1000). Python: int(time.time()).{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "What is a 10-digit timestamp?",
"acceptedAnswer": {
"@type": "Answer",
"text": "A 10-digit timestamp is Unix time in seconds since 1970-01-01T00:00:00Z (UTC). Example: 1700000000 → 2023-11-14 22:13:20 UTC."
}
},
{
"@type": "Question",
"name": "How do I tell seconds vs milliseconds?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Count digits. 10 digits = seconds, 13 digits = milliseconds. Values near 1,700,000,000 are current seconds."
}
},
{
"@type": "Question",
"name": "Should I convert in UTC or local time?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Use UTC for consistent results and to avoid DST surprises. Display in local time only for end users."
}
},
{
"@type": "Question",
"name": "Do JWT iat/exp use seconds or milliseconds?",
"acceptedAnswer": {
"@type": "Answer",
"text": "JWT iat/exp fields use seconds since the Unix epoch in UTC."
}
}
]
}
A 10-digit timestamp is one of the most dependable, portable ways to represent time across systems—but it’s easy to get tripped up by milliseconds, time zones, and DST. Convert in UTC, prefer ISO 8601/RFC 3339, and use 64-bit integers to future-proof your pipelines. ZenixTools streamlines this work with auto-detection, IANA time zones, copy-ready formats, and instant reverse conversions—so you move faster and make fewer mistakes.
Learn how to convert 1 meter to feet with precise formulas, quick methods, and real-world examples. Includes best practices, common mistakes, comparison tables, FAQs, and expert tips for accurate length conversions.
Learn how to convert 1 meter to feet with the exact formula, step-by-step instructions, quick mental math, and real-world examples. Includes charts, best practices, FAQs, and expert tips.