toISOString is not showing the millisec

46 Views Asked by At

We are getting the timestamp String as 2022-02-23T09:41:57Z but as per the document it should have the milliseconds also in the format YYYY-MM-DDTHH:mm:ss.sssZ The code is

(new Date()).toISOString()

But next request is having timestamp as 2022-02-23T09:41:57.003Z

The Browser detail

"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15"

Why are the milliseconds not coming? But in my browser

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15

I printed this in the loop it prints .000Z for millisec, is it depends on OS or Browser

0

There are 0 best solutions below