[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
This commit is contained in:
parent
9769279e96
commit
2a162d9be7
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue