0

In Node (v8.11.4) both

console.log(new Date().toISOString());

and

console.log(new Date());

give the same result

2018-08-20T06:36:06.043Z

But in Chrome

console.log(new Date().toISOString());

yields

2018-08-20T06:38:53.118Z

and

console.log(new Date());

yields

Mon Aug 20 2018 12:09:52 GMT+0530 (India Standard Time)

As it is known that, both chrome and node uses V8 JavaScript Engine, then why they produce different result??

Note: I tested them on node v8.11.4

Anshuman
  • 758
  • 7
  • 23
  • That's a `console` implementation discrepancy, not a Date one. – Kaiido Aug 20 '18 at 06:50
  • 1
    I guess you got the same question like this issue? https://stackoverflow.com/questions/33122006/new-date-shows-differents-results-in-chrome-or-firefox?lq=1 – Andrew Chan Aug 20 '18 at 06:51

0 Answers0