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
  • 81,041
  • 149
  • 392
  • 552

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
  • 158,678
  • 38
  • 247
  • 274
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
  • 570
  • 2
  • 10