Skip to content

Commit

Permalink
fix: Format timestamps in local time zone and locale
Browse files Browse the repository at this point in the history
Change-Id: I3a368303d5b16078b8c605f38bc91948120d86d2
  • Loading branch information
joeyparrish committed Nov 11, 2021
1 parent 5d94863 commit 4b3ae95
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions log-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,7 @@ class EmeLogWindow {
heading.appendChild(title);

const timestamp = new Date(log.timestamp);
// ISO date strings look like '2021-10-21T22:54:46.629Z', which is dense a
// little hard to read. Tweak the output a little into something more like
// '2021-10-21 22:54:46.629'.
const formattedTimestamp =
timestamp.toISOString().replace('T', ' ').replace('Z', '');
const formattedTimestamp = timestamp.toString();

time.textContent = formattedTimestamp;
if (log.duration) {
Expand Down

0 comments on commit 4b3ae95

Please sign in to comment.