Getting the time with JavaCcript returns the current user's machine time.
The following JavaScript code will return the number of milliseconds since midnight Jan 1, 1970.
var timestamp = new Date().getTime();
Now just grab the timestamp
variable and send it back to your webserver, if that's where you want to save this information. The easiest unobtrusive way I can think of to do this is by using ajax to POST the time information back to your server, for example (using jQuery):
$.post("saveusertime.php", { time: timestamp} );
Sources
JavaScript's Date Object: http://www.w3schools.com/jsref/jsref_obj_date.asp
jQuery's post() function: http://api.jquery.com/jQuery.post/