From 2f0b653cff8277820be3d894874d264711ed96d0 Mon Sep 17 00:00:00 2001 From: Roland Date: Thu, 29 Dec 2022 16:10:40 -0700 Subject: [PATCH] Timezone not required. --- app/src/components/Common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/components/Common.js b/app/src/components/Common.js index b5c62559..8b68f39c 100644 --- a/app/src/components/Common.js +++ b/app/src/components/Common.js @@ -81,7 +81,7 @@ export function secondsToElapsedPopup(seconds) { } export function isoDatetimeToElapsedPopup(dt) { - const d = new Date(`${dt}+00:00`); + const d = new Date(dt); return secondsToElapsedPopup(d.getTime() / 1000); } @@ -115,7 +115,7 @@ export function isoDatetimeToString(dt) { // Convert a datetime to a human-readable date format. let d = <>; if (dt) { - d = new Date(`${dt}+00:00`); + d = new Date(dt); d = `${d.getFullYear()}-${d.getMonth() + 1}-${d.getDate()}`; } return d;