Skip to content

Instantly share code, notes, and snippets.

@pbougie
Created June 5, 2012 00:57
Show Gist options
  • Save pbougie/2871766 to your computer and use it in GitHub Desktop.
Save pbougie/2871766 to your computer and use it in GitHub Desktop.
Time Zone Offset with JavaScript
function getTimezoneOffset(){
var now = new Date();
return (-1) * now.getTimezoneOffset() / 60;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment