How to get user timezone using jquery?

For detecting timezone offset you can use this function:

function get_time_zone_offset( ) {
  var current_date = new Date();
  return parseInt(-current_date.getTimezoneOffset() / 60);
}

Example you can see here

Leave a Comment