Skip to content

Commit 484168a

Browse files
authored
Merge pull request #516 from IABTechLab/wzh-UID2-5667-bug-fix-participant-summary-timestamp
multiply participant api key created time by 1000 to show correct date
2 parents 2db7bbf + 34cc146 commit 484168a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

webroot/js/participantSummary.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ function loadSiteCallback(result) {
8080
function loadAPIKeysCallback(result) {
8181
const textToHighlight = '"disabled": true';
8282
let resultJson = JSON.parse(result);
83-
resultJson = resultJson.map((item) => {
84-
const created = new Date(item.created).toLocaleString();
83+
resultJson = resultJson.map((item) => {
84+
const created = new Date((item.created)*1000).toLocaleString(); // Convert Unix timestamp in seconds to milliseconds for Date constructor
8585
return { ...item, created };
8686
});
8787
const formatted = prettifyJson(JSON.stringify(resultJson));
@@ -238,4 +238,4 @@ $(document).ready(() => {
238238
(err) => { rotateKeysetsErrorHandler(err, '#rotateKeysetsErrorOutput') });
239239
});
240240
});
241-
});
241+
});

0 commit comments

Comments
 (0)