toLocalDate

Converts a date to the "Etc/UTC" timezone.

Parameters

targetDate Date|Number

The date, represented as a date object or milliseconds, that will be converted to the "Etc/UTC" timezone.

Returns

Date The converted date to the "Etc/UTC" timezone.

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 targetMilliseconds = 1478352311000;
    var localeDateFromDate = kendo.timezone.toLocalDate(targetDate);
    var localeDateFromMs = kendo.timezone.toLocalDate(targetMilliseconds);

/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(localeDateFromDate); // Sat Nov 05 2016 13:25:11 GMT+0200 (FLE Standard Time);
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(localeDateFromMs); // Sat Nov 05 2016 13:25:11 GMT+0200 (FLE Standard Time);
</script>
In this article