get client timezone offset JavaScript

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

Source

Also in JavaScript: