Why milliseconds
JavaScript's Date, most browser and Node.js APIs, and many logging systems use epoch milliseconds rather than seconds, since it's the native precision of Date.now().
Convert epoch milliseconds to and from human-readable dates directly in your browser.
JavaScript's Date, most browser and Node.js APIs, and many logging systems use epoch milliseconds rather than seconds, since it's the native precision of Date.now().
Multiply seconds by 1,000 to get milliseconds, or divide milliseconds by 1,000 to get seconds. A 13-digit number is almost always milliseconds; a 10-digit number is almost always seconds.
Values with more than 13 digits are treated as microseconds here, matching timestamps from databases and tracing systems that need sub-millisecond precision.