From 8ef72c59e67d811119030b4c13afc92a2b09ee54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 19 Apr 2012 10:58:38 +0200 Subject: [PATCH] [FIX] Dates on message are now displayed according to the user timezone. bzr revid: tde@openerp.com-20120419085838-awmxdqjbsb8qyi38 --- addons/mail/static/src/js/mail.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 8e507416a37..d99674f98a7 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -275,6 +275,8 @@ openerp.mail = function(session) { record.tr_body = this.do_truncate_string(record.body, this.params.msg_more_limit); record.body = this.do_replace_internal_links(record.body); if (record.tr_body) record.tr_body = this.do_replace_internal_links(record.tr_body); + // format date according to the user timezone + record.date = session.web.format_value(record.date, {type:"datetime"}); // render $(session.web.qweb.render('ThreadMsg', {'record': record, 'thread': this, 'params': this.params, 'display': this.display}) ).appendTo(this.$element.children('div.oe_mail_thread_display:first'));