diff options
| author | Martin Trigaux <mat@openerp.com> | 2014-01-21 11:27:25 -0200 |
|---|---|---|
| committer | Martin Trigaux <mat@openerp.com> | 2014-01-21 11:27:25 -0200 |
| commit | 9a0a02060fa048ce92ee0dab1bfbdcff63573237 (patch) | |
| tree | f98480ea3b1dd8d32bb74b1c15fe1711be365511 /addons/web/static/src | |
| parent | c09798bfbb469ed75dc54c7ce140e531dd925d75 (diff) | |
[FIX] format_value: when formating to date, make sure not converting from a datetime string as would make timezones apply and lead to a possible day change
bzr revid: mat@openerp.com-20140121132725-k9f8hna3lg7nq7g8
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/formats.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web/static/src/js/formats.js b/addons/web/static/src/js/formats.js index dd0a9040b6b..640d919f4c1 100644 --- a/addons/web/static/src/js/formats.js +++ b/addons/web/static/src/js/formats.js @@ -191,6 +191,9 @@ instance.web.format_value = function (value, descriptor, value_if_empty) { + ' ' + normalize_format(l10n.time_format)); case 'date': if (typeof(value) == "string") + if (value.length > 10) + // in case value is a datetime, strip to avoid time manipulation + value = value.substring(0,10); value = instance.web.auto_str_to_date(value); return value.toString(normalize_format(l10n.date_format)); case 'time': |
