[{"data":1,"prerenderedAt":144},["ShallowReactive",2],{"page:/milliseconds":3},{"id":4,"title":5,"body":6,"description":120,"extension":121,"eyebrow":122,"faq":123,"locale":133,"meta":134,"navigation":135,"pageType":136,"path":137,"related":138,"seo":139,"stem":142,"__hash__":143},"pages/en/milliseconds.md","Current milliseconds",{"type":7,"value":8,"toc":111},"minimark",[9,14,18,22,29,33,36,40,98,102],[10,11,13],"h2",{"id":12},"why-milliseconds-usually-have-13-digits","Why milliseconds usually have 13 digits",[15,16,17],"p",{},"Modern dates are roughly 1.7 trillion milliseconds after the Unix epoch, which gives a 13-digit positive value. Digit count changes for earlier and far-future dates, so it should not be the only validation rule.",[10,19,21],{"id":20},"javascript-precision","JavaScript precision",[15,23,24,28],{},[25,26,27],"code",{},"Date.now()"," returns whole milliseconds from the device clock. Multiplying that value can express microsecond or nanosecond units, but it cannot create new timing precision. Systems requiring measured sub-millisecond timing need an appropriate high-resolution clock and a carefully defined epoch relationship.",[10,30,32],{"id":31},"how-to-use-this-tool","How to use this tool",[15,34,35],{},"Copy the milliseconds row for an API or database field documented in milliseconds. The seconds row is divided by 1,000; microsecond and nanosecond rows scale the same device-clock reading. They are not independent high-resolution clock measurements.",[10,37,39],{"id":38},"worked-input-and-output","Worked input and output",[41,42,43,56],"table",{},[44,45,46],"thead",{},[47,48,49,53],"tr",{},[50,51,52],"th",{},"Input or setting",[50,54,55],{},"Expected result",[57,58,59,74,86],"tbody",{},[47,60,61,68],{},[62,63,64,67],"td",{},[25,65,66],{},"1700000000"," · s",[62,69,70,73],{},[25,71,72],{},"1700000000000"," · ms",[47,75,76,80],{},[62,77,78,73],{},[25,79,72],{},[62,81,82,85],{},[25,83,84],{},"1700000000000000"," · µs",[47,87,88,92],{},[62,89,90,73],{},[25,91,72],{},[62,93,94,97],{},[25,95,96],{},"1700000000000000000"," · ns",[10,99,101],{"id":100},"checks-before-using-the-result","Checks before using the result",[15,103,104,105,110],{},"An incorrect device clock produces an incorrect current value. This page does not synchronize your clock with an external time service. For a stored value, use ",[106,107,109],"a",{"href":108},"/timestamp-to-date/","timestamp to date"," and choose milliseconds. For execution duration, use a monotonic runtime timer; calendar time can move when the system clock is corrected.",{"title":112,"searchDepth":113,"depth":113,"links":114},"",2,[115,116,117,118,119],{"id":12,"depth":113,"text":13},{"id":20,"depth":113,"text":21},{"id":31,"depth":113,"text":32},{"id":38,"depth":113,"text":39},{"id":100,"depth":113,"text":101},"Copy the current 13-digit Unix time in milliseconds and compare it with seconds, microseconds and nanoseconds.","md","Live precision / 03",[124,127,130],{"question":125,"answer":126},"Why is the current millisecond timestamp usually 13 digits?","Contemporary dates are about 1.7 trillion milliseconds after the 1970 epoch. Earlier and far-future dates can have a different length.",{"question":128,"answer":129},"What does Date.now() return?","JavaScript Date.now() returns the whole number of Unix milliseconds indicated by the device clock.",{"question":131,"answer":132},"Does multiplying milliseconds create precise nanoseconds?","No. Multiplication changes the unit, but the added trailing zeros are not measured sub-millisecond precision.","en",{},true,"tool","/en/milliseconds",null,{"title":140,"description":141},"Current Time in Milliseconds — Unix Milliseconds Now","Get the current 13-digit Unix timestamp in milliseconds, with seconds, microseconds, nanoseconds and conversion guidance.","en/milliseconds","ihI6OhjQXot0C0oNYstCYNb-BIg6yv8ld2-Ha-wUiqw",1792032483047]