diff --git a/js/utils/Utils.js b/js/utils/Utils.js index fd79f448..60e36708 100644 --- a/js/utils/Utils.js +++ b/js/utils/Utils.js @@ -1,9 +1,9 @@ 'use strict'; import Bowser from 'bowser'; import * as Constants from "../constants/DefaultConstants"; +import {ROLE} from "../constants/DefaultConstants"; import * as Vocabulary from "../constants/Vocabulary"; import * as supportedDevices from "../constants/SupportedDevices"; -import {ROLE} from "../constants/DefaultConstants"; /** * Common propositions that should not be capitalized @@ -274,13 +274,11 @@ export function deviceIsSupported() { // format to DD-MM-YYYY HH:mm:ss:SSS export function formatDateWithMilliseconds(timestamp) { - const date = new Date(timestamp / 1000); - const dateStr = - ("00" + date.getDate()).slice(-2) + "-" + + const date = new Date(timestamp); + return ("00" + date.getDate()).slice(-2) + "-" + ("00" + (date.getMonth() + 1)).slice(-2) + "-" + date.getFullYear() + " " + ("00" + date.getHours()).slice(-2) + ":" + ("00" + date.getMinutes()).slice(-2) + ":" + ("00" + date.getSeconds()).slice(-2) + ("00" + date.getMilliseconds()).slice(-2); - return dateStr; } \ No newline at end of file