Timezone not required.

This commit is contained in:
Roland 2022-12-29 16:10:40 -07:00
parent f1cf84e037
commit 2f0b653cff
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -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;