From 435fdae84ac49b1366b8737215d97bd82002dccf Mon Sep 17 00:00:00 2001 From: Alexander Tseung Date: Thu, 13 Dec 2018 12:48:15 -0800 Subject: Fix displayed time and date in the activity log. Remove vreme library, add luxon library. (#5932) --- ui/app/util.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui/app/util.js') diff --git a/ui/app/util.js b/ui/app/util.js index 28f027e26..31757e7c3 100644 --- a/ui/app/util.js +++ b/ui/app/util.js @@ -1,15 +1,15 @@ const abi = require('human-standard-token-abi') const ethUtil = require('ethereumjs-util') const hexToBn = require('../../app/scripts/lib/hex-to-bn') -const vreme = new (require('vreme'))() +import { DateTime } from 'luxon' const MIN_GAS_PRICE_GWEI_BN = new ethUtil.BN(1) const GWEI_FACTOR = new ethUtil.BN(1e9) const MIN_GAS_PRICE_BN = MIN_GAS_PRICE_GWEI_BN.mul(GWEI_FACTOR) // formatData :: ( date: ) -> String -function formatDate (date, format = '3/16/2014 at 14:30') { - return vreme.format(new Date(date), format) +function formatDate (date, format = 'M/d/y \'at\' T') { + return DateTime.fromMillis(date).toFormat(format) } var valueTable = { -- cgit