diff options
| author | Adrien Dieudonne <adr@odoo.com> | 2017-08-16 13:21:54 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-08-17 17:24:00 +0200 |
| commit | b9bfec96dd038d23e26cc822560fee452a0a3271 (patch) | |
| tree | 47c6c74a934e86ce01839122a2fb7dcf552cf913 /addons/web/static/tests/fields/relational_fields_tests.js | |
| parent | 88dfcfd025ad87476d27cb7122cedc9ab2e94d3c (diff) | |
[FIX] web: don't apply timezone offset for date fields
Before this rev., all date fields values were off by one day as
soon as the user timezone was negative.
With the new views, all dates manipulated by the JS are moment
instances in UTC, and when being displayed, they are correctly
formatted in the user locale by applying the timezone offset.
However, this should obviously not be done for date fields as
when no time is specified when creating a moment instance, it
defaults to 00:00:00, so applying a negative offset always leads
to the day before.
Remark:
It happens that datetime fields are displayed as a date (e.g.
purchase order line form view). In that case, the offset is
applied on the displayed date.
Diffstat (limited to 'addons/web/static/tests/fields/relational_fields_tests.js')
0 files changed, 0 insertions, 0 deletions
