Format timestamps according to client locale
This commit is contained in:
1 parent
d222e488c2
commit
8b540c2a97
2 files changed
+3
-3
No files matched your search
@@ -11,7 +11,7 @@ const component = {
|
||||
if (!param || !param.value) return m("span.na", "N/A");
|
||||
let value = param.value[0];
|
||||
if (param.value[1] === "xsd:dateTime")
|
||||
value = new Date(value).toISOString();
|
||||
value = new Date(value).toLocaleString();
|
||||
|
||||
let edit;
|
||||
if (param.writable)
|
||||
|
||||
@@ -9,7 +9,7 @@ import * as store from "./store";
|
||||
import * as notifications from "./notifications";
|
||||
|
||||
function init(args) {
|
||||
if (!window.authorizer.hasAccess("devices", 2))
|
||||
if (!window.authorizer.hasAccess("faults", 2))
|
||||
return Promise.reject(
|
||||
new Error("You are not authorized to view this page")
|
||||
);
|
||||
@@ -77,7 +77,7 @@ function renderTable(faultsResponse, total, selected, showMoreCallback) {
|
||||
m("td", f["code"]),
|
||||
m("td", f["message"]),
|
||||
m("td", f["retries"]),
|
||||
m("td", f["timestamp"])
|
||||
m("td", new Date(f["timestamp"]).toLocaleString())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user