How epoch converts to IST

A Unix timestamp counts time since 1 January 1970, 00:00:00 UTC. It has no time zone of its own, so the same number is the same moment everywhere. IST is simply how that moment reads in India.

IST is UTC+05:30 all year, because India doesn't use daylight saving. To convert by hand, add 5 hours 30 minutes (19,800 seconds) to the UTC time. For example, 1800000000 is 08:00:00 UTC on 15 January 2027, which is 13:30:00 IST.

Which format do you have?

  • 10 digits: seconds, used by most APIs and logs.
  • 13 digits: milliseconds, common in JavaScript and crypto APIs.
  • 16 digits: microseconds, an option on some APIs.
  • 19 digits: nanoseconds, used by low-latency systems and NSE order feeds.

The converter detects the format from the number of digits. NSE tick-by-tick feeds count from 1 January 1980 rather than 1970, so choose NSE feed under “Counted from” when you paste one. Otherwise the date reads about 10 years early.

In code

In Python: datetime.fromtimestamp(ts, ZoneInfo("Asia/Kolkata")). Use the zone name Asia/Kolkata instead of hard-coding an offset, so your code stays correct and easy to read.

Use the Date → Epoch tab to go the other way: enter an IST date and time and get seconds, milliseconds and nanoseconds.