diff options
| author | Aaron Bohy <aab@odoo.com> | 2015-10-06 14:31:36 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2015-10-06 16:23:56 +0200 |
| commit | 212bbf1f7e6d8e14b4017c1683655ed0e823db3f (patch) | |
| tree | 5314da7785c71f6fe0d7a5cd28dfa7ad4dd9cc46 /addons/mail/static/src/js/thread.js | |
| parent | 581c38cdca72fa0414fbeadd1861c96abc44fbe3 (diff) | |
[FIX] mail: thread: messages' date displayed in browser's timezone
Diffstat (limited to 'addons/mail/static/src/js/thread.js')
| -rw-r--r-- | addons/mail/static/src/js/thread.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/mail/static/src/js/thread.js b/addons/mail/static/src/js/thread.js index e226ac33bb8..190391d94de 100644 --- a/addons/mail/static/src/js/thread.js +++ b/addons/mail/static/src/js/thread.js @@ -2,6 +2,7 @@ odoo.define('mail.ChatThread', function (require) { "use strict"; var core = require('web.core'); +var time = require('web.time'); var Widget = require('web.Widget'); var QWeb = core.qweb; @@ -65,6 +66,9 @@ var Thread = Widget.extend({ _preprocess_message: function (message) { var msg = _.extend({}, message); + // Set the date in the browser timezone + msg.date = moment(time.str_to_datetime(msg.date)).format('YYYY-MM-DD HH:mm:ss'); + // Compute displayed author if (!msg.author_id || !msg.author_id[1]) { msg.displayed_author = msg.email_from || this.options.default_username; |
