From 11bbf9e633fccdd85a2c6a98cec5fbb222d78e07 Mon Sep 17 00:00:00 2001 From: azivner Date: Tue, 24 Oct 2017 18:57:00 -0400 Subject: [PATCH] fix formatting of date/time --- public/javascripts/utils.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/public/javascripts/utils.js b/public/javascripts/utils.js index 3bea44d10..ed96f2976 100644 --- a/public/javascripts/utils.js +++ b/public/javascripts/utils.js @@ -52,11 +52,7 @@ function base64ToUint8Array(base64encoded) { function getDateFromTS(timestamp) { // Date accepts number of milliseconds since epoch so UTC timestamp works without any extra handling // see https://stackoverflow.com/questions/4631928/convert-utc-epoch-to-local-date-with-javascript - const utcDate = new Date(timestamp * 1000); - - const localDate = new Date(utcDate.getTime() - utcDate.getTimezoneOffset() * 60 * 1000); - - return localDate; + return new Date(timestamp * 1000); } function formatTime(date) {