devShakib

Loading devShakib…

Timestamp Converter

Convert between Unix epoch (seconds/ms) and human dates in local time and UTC.

Unix time counts seconds from midnight UTC on 1 January 1970, which makes it a single integer with no timezone attached — the timezone only appears when you format it for a human. That is the whole appeal, and the whole trap: two systems can agree perfectly on an instant and still disagree about what day it was.

The bug you will actually hit is the factor of a thousand. JavaScript reports milliseconds and most backends report seconds, so a value pasted from the wrong side lands in 1970 or somewhere around the year 56000, and the giveaway is always the magnitude — ten digits is seconds, thirteen is milliseconds.