Commit 07728f28 authored by Leo Iannacone's avatar Leo Iannacone

better time and date rapresentation

parent 10ef0363
...@@ -353,7 +353,7 @@ function Page_Distrubion(socket) { ...@@ -353,7 +353,7 @@ function Page_Distrubion(socket) {
day: "numeric", day: "numeric",
}; };
var result = date.toLocaleDateString(locale, options); var result = date.toLocaleDateString(locale, options);
result += ' <b>' + date.toLocaleTimeString() + '</b>'; result += ' <b>' + date.getHours() + ':' + date.getMinutes() + '</b>';
return result; return result;
} }
...@@ -368,9 +368,9 @@ function Page_Distrubion(socket) { ...@@ -368,9 +368,9 @@ function Page_Distrubion(socket) {
info += ' - finished ' + get_time(socket_data.end); info += ' - finished ' + get_time(socket_data.end);
info += ' - elapsed time: <b>'; info += ' - elapsed time: <b>';
var elapsed = new Date((socket_data.end - socket_data.start) * 1000); var elapsed = new Date((socket_data.end - socket_data.start) * 1000);
if (elapsed.getUTCHours() > 0) info += ("0" + elapsed.getUTCHours()).slice(-2) + ':';
info += ("0" + elapsed.getUTCHours()).slice(-2) + ':'; info += ("0" + elapsed.getUTCMinutes()).slice(-2) + ':';
info += ("0" + elapsed.getUTCMinutes()).slice(-2) + ':' + ("0" + elapsed.getUTCSeconds()).slice(-2); info += ("0" + elapsed.getUTCSeconds()).slice(-2);
} }
$("#package_info").html(info); $("#package_info").html(info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment