From fa1e72bf959620a6d9bb8d4e1088c46c12d643c6 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sun, 1 Dec 2019 14:23:27 +0000 Subject: [PATCH] experimient. Fully expecting Circle to fail thisSigned-off-by: Adam Warner --- src/util/dateUtils.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/dateUtils.tsx b/src/util/dateUtils.tsx index cad0c73..9690753 100644 --- a/src/util/dateUtils.tsx +++ b/src/util/dateUtils.tsx @@ -7,10 +7,11 @@ * * This file is copyright under the latest version of the EUPL. * Please see LICENSE file for your rights under this license. */ +import i18n from "i18next"; export function getTimeFromTimestamp(input: number) { const date = new Date(input * 1000); - var language = window.navigator.language; + const options = { month: "short", day: "numeric", @@ -20,7 +21,7 @@ export function getTimeFromTimestamp(input: number) { second: "2-digit" }; - const formattedString = date.toLocaleTimeString(language, options); + const formattedString = date.toLocaleTimeString(i18n.language, options); return formattedString; }