From 4b3ae95a6babb0bdf3ced31ce393b4b31a85f1b7 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Thu, 11 Nov 2021 09:45:22 -0800 Subject: [PATCH] fix: Format timestamps in local time zone and locale Change-Id: I3a368303d5b16078b8c605f38bc91948120d86d2 --- log-window.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/log-window.js b/log-window.js index 165a72f..2fc0dab 100644 --- a/log-window.js +++ b/log-window.js @@ -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) {