summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2015-02-04 14:31:32 +0100
committerDenis Ledoux <dle@odoo.com>2015-02-04 14:33:01 +0100
commit2a162d9be71ee00f7698dda7075801ef8213c1d4 (patch)
tree727ef92fbd2b4624c7648202b03c9aea75447ece /addons/web/static/src
parent9769279e9605278281725ccc9fbbf321f5ba3524 (diff)
[FIX] web: widget date handling user timezone
When converting a datetime field to date, using the widget date, the date time value was just cropped, removing the hours, therefore ignoring the user time zone. For instance, if the user was in UTC + 1, for a date time 02/02/2015 00:30:00, applying the widget date on this datetime had as result 02/01/2015, due to the fact the UTC value of the datetime field was 02/01/2015 23:30:00 fixes #4420 opw-621281
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/formats.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/formats.js b/addons/web/static/src/js/formats.js
index 80719d708ab..cddeced29ca 100644
--- a/addons/web/static/src/js/formats.js
+++ b/addons/web/static/src/js/formats.js
@@ -191,7 +191,7 @@ instance.web.format_value = function (value, descriptor, value_if_empty) {
+ ' ' + normalize_format(l10n.time_format));
case 'date':
if (typeof(value) == "string")
- value = instance.web.str_to_date(value.substring(0,10));
+ value = instance.web.auto_str_to_date(value);
return value.toString(normalize_format(l10n.date_format));
case 'time':
if (typeof(value) == "string")