﻿$(document).ready(function() {

    var lt = new Date();
    var tz = -lt.getTimezoneOffset() / 60;

    $.ajax({ type: 'POST',
        url: $('#hdnRootUrl').attr('value') + 'services/servicehelper.asmx/SetTimezone',
        dataType: 'xml',
        data: 'Timezone=' + tz,
        processData: false,
        error: function(XMLHttpRequest, textStatus, errorThrown) { ajaxError(XMLHttpRequest, textStatus, errorThrown); },
        success: function(xml) { }
    });

    function ajaxError(xmlObj, textStatus, errorThrown) {
        //alert(errorThrown);
    }
});