Hi JS-Support,
Thank you for your prompt reply.
I confirmed the error I submitted was fixed. But another error related to DateTime arose shown below.
Runtime Error "cannot construct UInt64 from negative number"
I guess this error caused by my time zone that is UTC+09:00 (Tokyo Japan).
In the function hmsmToTicks(hour, minute, second, millisecond) JSIL.Bootstrap.DateTime.js line 560,
the value “rest” becomes negative.
Code: Select all
function hmsmToTicks(hour, minute, second, millisecond) {
var date = new Date();
if (millisecond === undefined) {
millisecond = 0;
}
var rest = hour * 60; //60 minutes in a hour
rest += minute + date.getTimezoneOffset(); //getTimezoneOffset because when DateTimeKind is unspecified, we don't want it to be UTC (and get_Hour uses Date which considers the hour to be UTC and compensates it --> wrong hour at in the end)
rest *= 60; //60 seconds in a minute
rest += second;
rest *= 1000; //1000 milliseconds in a second
if (millisecond != 0) {
rest += millisecond + 1; //for some reason, the constructor was creating a DateTime with 1 millisecond less than expected
}
rest *= 10000; //10000 ticks in a millisecond
return $jsilcore.System.UInt64.FromNumber(rest);
}