JavaScript’s getTime() returns “the number of milliseconds since 1 January 1970 00:00:00 UTC”.
Can I rely on this being similar across different machines? I don’t need it to be accurate to the millisecond, just to a few seconds.
Or do I need to use an external time service API, as in this question?
Where does JavaScript get the current time from – is it dependent on the machine’s clock?
No.
The system datetime on which this javascript runs.
You could use the server’s time and send it to the client.