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>
    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);
    console.log(localeDateFromDate); // Sat Nov 05 2016 13:25:11 GMT+0200 (FLE Standard Time)
    console.log(localeDateFromMs); // Sat Nov 05 2016 13:25:11 GMT+0200 (FLE Standard Time)
</script>
In this article
Not finding the help you need?