Created
June 5, 2012 00:57
-
-
Save pbougie/2871766 to your computer and use it in GitHub Desktop.
Time Zone Offset with JavaScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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