get client timezone offset in JavaScript

JavaScript
var clientTimezoneOffset = new Date().getTimezoneOffset()/60;//offset in hours

Source

Also in JavaScript: