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>
  var version = kendo.version;

  $.getScript(
    "https://kendo.cdn.telerik.com/" +
      version +
      "/js/kendo.timezones.min.js",
    loadExample,
  );

  function loadExample() {
    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
offset
Not finding the help you need?
Contact Support