2

When I do:

var myDate = new Date();

Does it use UTC timezone by default? Or could this vary based on client location?

Richard Knop
  • 77,193
  • 144
  • 386
  • 546

2 Answers2

4

From MDN

If you supply no arguments, the constructor creates a JavaScript Date object for today's date and time according to local time.

It only depends on your local time.

xdazz
  • 154,648
  • 35
  • 237
  • 264
2

AFAIK It takes the date and time from the machine it's running on, and it will use whatever timezone it is given from the OS, so I believe it would change based on client location, providing they have their machine set up correctly.

Darren Crabb
  • 548
  • 2
  • 9