Convert a Unix timestamp to IST
Unix time is UTC seconds
IST is UTC+5:30, with no daylight saving
The milliseconds trap
A Unix timestamp is a count of seconds since 1970-01-01 00:00:00 UTC. It is not local time, and it does not carry a timezone. The same number is the same instant everywhere; the timezone only matters when you render it as a clock time. So converting to IST is not a different timestamp, it is the same instant displayed at a UTC offset of five hours and thirty minutes.
India Standard Time does not observe daylight saving. The offset is UTC+5:30 all year, every year, which makes it easier than converting to a zone that shifts twice a year and harder in one specific way: the half hour. An offset of 5 hours lands you thirty minutes out, and that error hides because the result still looks like a plausible time. Add five hours and thirty minutes to the UTC reading, or let a converter do it with the Asia/Kolkata zone, and do not round to the hour.
The bug that produces nonsense dates is the unit. JavaScript's Date uses milliseconds, so a 13-digit value near 1.7 trillion is milliseconds and a 10-digit value near 1.7 billion is seconds. Feed milliseconds to a function that expects seconds and you get a date in the year 50000; feed seconds where milliseconds are expected and you get January 1970. Count the digits before you convert. The timestamp converter takes either unit and renders the instant in IST.
Open the timestamp converter →