Skip to content

Commit

Permalink
fix(messages): #308 incorrect time displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Feb 4, 2020
1 parent ca53efc commit 2f1b8d6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/public/js/pages/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ define('pages/messages', [
'" data-uk-tooltip="{pos:\'left\', animation: false}" title="' +
message.owner.fullname +
' - ' +
moment(message.createdAt).format(helpers.getShortDateFormat() + ' ' + helpers.getTimeFormat()) +
moment(message.createdAt)
.tz(helpers.getTimezone())
.format(helpers.getShortDateFormat() + ' ' + helpers.getTimeFormat()) +
'"/>'
html += '<div class="message-body">'
html += '<p>' + message.body + '</p>'
Expand All @@ -240,7 +242,9 @@ define('pages/messages', [
html += '<div class="message message-right">'
html +=
'<div class="message-body" data-uk-tooltip="{pos:\'right\', animation: false}" title="' +
moment(message.createdAt).format(helpers.getShortDateFormat() + ' ' + helpers.getTimeFormat()) +
moment(message.createdAt)
.tz(helpers.getTimezone())
.format(helpers.getShortDateFormat() + ' ' + helpers.getTimeFormat()) +
'">'
html += '<p>' + message.body + '</p>'
html += '</div>'
Expand Down

0 comments on commit 2f1b8d6

Please sign in to comment.