Skip to content
EverythingTool logo

Developer guides

Unix Timestamp Explained: Convert Epoch Time to IST and Back

Updated 25 September 2026 · 4 min read

A Unix timestamp (epoch time) is the number of seconds since 1 January 1970, 00:00 UTC. It's how databases, APIs, JWTs and log files store time — one number, no time zone confusion.

Example

1790000000 = 21 September 2026, 14:13:20 UTC = 21 September 2026, 7:43:20 pm IST. IST is always UTC + 5:30 (India doesn't use daylight saving).

Convert any timestamp to IST, UTC and backConvert Unix epoch timestamps to human dates in IST, UTC or local time — and back.

Seconds vs milliseconds

10 digits = seconds (Unix, PHP, Python, databases). 13 digits = milliseconds (JavaScript, Java). Mixing them up gives dates in 1970 or in the year 58,000.

In code

// JavaScript
Math.floor(Date.now() / 1000);                       // now, in seconds
new Date(1790000000 * 1000).toLocaleString("en-IN", { timeZone: "Asia/Kolkata" });

# Python
import datetime, zoneinfo
datetime.datetime.fromtimestamp(1790000000, zoneinfo.ZoneInfo("Asia/Kolkata"))

// PHP
date_default_timezone_set("Asia/Kolkata");
echo date("d M Y, h:i:s A", 1790000000);

In Excel or Google Sheets

With the timestamp in A1: =A1/86400 + DATE(1970,1,1) + 5.5/24, then format the cell as a date and time. The 5.5/24 adds IST's 5½ hours.

The year 2038 problem

Systems that store the timestamp as a signed 32-bit number run out at 2147483647 — 19 January 2038, 03:14:07 UTC. Use 64-bit integers (or your database's native date type) for anything that must last.

Frequently asked questions

How do I know if a timestamp is in seconds or milliseconds?

Current timestamps in seconds have 10 digits (e.g. 1790000000); in milliseconds they have 13 (1790000000000). JavaScript's Date.now() returns milliseconds.

Does a Unix timestamp have a time zone?

No. It always counts from 1 January 1970 00:00 UTC. Time zones only matter when you display it — IST is UTC + 5 hours 30 minutes.

Open the Unix Timestamp ConverterConvert Unix epoch timestamps to human dates in IST, UTC or local time — and back.
Share this guide WhatsApp X Facebook

Official websites, opening in a new tab. EverythingTool isn't affiliated with them.