This may be a dumb question, I'm 99% sure it does, but I need to be sure... does JS use the local computer's time?
Yes it does use the computer's local time. To test, change your computer time and it will reflect in new Date
It'll use the time on whatever computer is running the code.
In most cases, that's in a web browser on a client computer, so it'll use whatever time the web browser sees. This is most likely the computer's local time (unless the browser is doing something weird, which most don't and I've never seen).
Note that if you're using something like node.js and running server-side Javascript then it'll use the local time for that computer instead :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With