Back to Blog
Converters5 min read

Unix Timestamp Complete Guide

Understand Unix timestamps, epoch time, and master date conversions across timezones. Plus: Discord and Slack timestamp formatting.

What is a Unix Timestamp?

A Unix timestamp (also called Epoch time or POSIX time) represents the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC. This date is known as the Unix Epoch.

1701648000

Example: December 4, 2023 00:00:00 UTC

Seconds vs Milliseconds

Different systems use different precisions. The key is to count the digits:

1701648000

10 digits = Seconds

Used by: Unix/Linux, Python, PHP

1701648000000

13 digits = Milliseconds

Used by: JavaScript, Java

Common Use Cases

API Responses

APIs often return timestamps for created_at, updated_at fields

Log Analysis

Server logs use timestamps for event tracking

Database Storage

Timestamps are timezone-agnostic and sortable

Discord Timestamp Codes

Discord supports dynamic timestamps that automatically adjust to each user's timezone. Use the format: <t:TIMESTAMP:FORMAT>

<t:1701648000:F>Thursday, December 4, 2023 12:00 AM
<t:1701648000:R>2 months ago (relative)
<t:1701648000:d>12/04/2023 (short date)

Try Our Timestamp Converter

Convert timestamps instantly with auto-detection, timezone support, and Discord formatters.

Open Timestamp Converter

Get Current Timestamp (Code)

JavaScript

// Milliseconds
Date.now()

// Seconds
Math.floor(Date.now() / 1000)

Python

import time
time.time()  # Seconds as float

Bash

date +%s  # Seconds

Written by AI AutoSite Team • Last updated 2025-12-04