Local time of the local computer

I would like to be able to get the local time of the local computer using Javascript Date class.

var tz = new Date().getTimezoneOffset();

Gives you timezone.

How would I get local time?

The Date object has a lot of methods https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
You should be able to do just about anything you need with those - except -
you can get server time and computer time, but they are only as correct as they are on the server or computer.
That is, if the computer time is wrong, you won’t get the correct “local” time.