diff --git a/dashboard.py b/dashboard.py index 6fb5a52..4f7468e 100644 --- a/dashboard.py +++ b/dashboard.py @@ -13,7 +13,7 @@ root_content_path = 'dashboard_static' # the action will be called with the context and the event @event('init') def setup(ctx, e): - start_offline_tweets('sports1.txt', event_name="tweet", time_factor=0.1) + start_offline_tweets('sports1.txt', event_name="tweet", time_factor=0.01) ctx.count = 0 # fire('sample', {'previous': 0.0}) diff --git a/dashboard_static/js/code.js b/dashboard_static/js/code.js index a05d79c..dac7257 100644 --- a/dashboard_static/js/code.js +++ b/dashboard_static/js/code.js @@ -24,16 +24,19 @@ function showFeeds() { } function tweetCell(tweet) { + const date = new Date(tweet.created_at); + console.log(new Intl.DateTimeFormat('en-GB').format(date)); var cell = document.createElement("div"); cell.innerHTML = `
${tweet.created_at}
+ + ${date.getHours()}:${date.getMinutes()}