offset

Returns the timezone difference between UTC and the passed timezone.

Parameters

utcTime Date|Number

The utcTime, represented as a date object or milliseconds.

timezone String

The timezone.

Returns

Number A number, representing the time difference between UTC and the passed timezone, in minutes.

Example

<script>
    // include kendo.timezones.js
    var version = kendo.version;

    $('<script/>', { 
        type:'text/javascript', 
        src:'https://kendo.cdn.telerik.com/'+version+'/js/kendo.timezones.min.js'
    }).appendTo('head');
</script>

<script>
    var targetDate = new Date(2016,10,5,15,25,11);
    var timeZoneOffset = kendo.timezone.offset(targetDate,"Europe/Sofia");

/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(timeZoneOffset); //-120
</script>
In this article