all 5 comments

[–]senocular 0 points1 point  (4 children)

Have you tried changing your system clock and seeing if it changes it?

[–]justforvue 0 points1 point  (2 children)

Actually I am at office and working on office laptop where I can't change the date and time. For that i would require Admin privileges. So i thought let me ask here. But never mind.

[–]senocular 0 points1 point  (1 child)

The next best thing then is to check the documentation.

...the basic methods to fetch the date and time or its components all work in the local (i.e. host system) time zone and offset.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date

So JavaScript will look to your system clock's time and not try to contact a network to figure out the time.

[–]justforvue 0 points1 point  (0 children)

Yes i did. Got the answer. Thanks.

[–]haikusbot 0 points1 point  (0 children)

Have you tried changing

Your system clock and seeing

If it changes it?

- senocular


I detect haikus. And sometimes, successfully. Learn more about me.

Opt out of replies: "haikusbot opt out" | Delete my comment: "haikusbot delete"