Skip to content

Instantly share code, notes, and snippets.

@niyazpk
Created April 3, 2012 05:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niyazpk/2289547 to your computer and use it in GitHub Desktop.
Save niyazpk/2289547 to your computer and use it in GitHub Desktop.
Get the server time using JS
$.ajax({
type: 'HEAD',
url: '/',
success: function(data, textStatus, jqXHR){
log( new Date(jqXHR.getResponseHeader('Date')) );
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment