This question is locked. New answers and comments are not allowed.
Hello,
I am using kendo.parseDate to calculate the offset time of day, as my database does not use UTC and also because I want to show the time of a given time zone where my events are taking place. It works as expected in vast majority of devices but I have a couple of users with at least one on Android 6 for which the code below does not work. Any ideas or suggestions?
01.
function
offsetScheduleTime(t){
02.
var
oStr = kendo.toString(kendo.parseDate(t),
"HH:mmzzz"
);
//reads 13:00+02:00
03.
if
(oStr !== undefined && oStr.length == 11) {
04.
var
oOffHour = parseInt(oStr.substr(5, 2));
05.
var
d =
new
Date(t);
06.
var
res =
new
Date(d.setHours(d.getHours() + oOffHour));
07.
return
kendo.toString(res,
"HH:mm"
);
08.
}
09.
else
{
10.
return
kendo.toString(kendo.parseDate(t),
"HH:mm"
);
11.
}
12.
}
Thanks a lot for your help.
Julien