Environment: I'm looking at 'check_in' and 'check_out' fields in 'hr.attendance' which are just basic fields.Datetime fields.
In its form view, they are also listed in <field> tags with no special widgets or anything.
I'm cloning odoo community edition and running odoo-bin on my local server.
Expectation: Every fields.Datetime is stored in UTC, and rendered in views depending on user's timezone settings. Thus when I export 'hr.attendance' records, the exported data should have UTC records for 'check_in' and 'check_out' regardless of my user timezone settings. However, when I change my user timezone settings, what I see in views should change.
Actual: Exported values change when I change user timezone settings. Views don't change Datetime values no matter how I change user timezone settings.
For example, when creating a new record for 'hr.attendance', the field 'check_in' will pick up a default Datetime value with 'default=fields.Datetime.now'. This displays the same time that I see on my local device. So I'd believe 'it displays the check-in time in views according to my timezone settings, and will store a different value matching UTC in the database.'
Am I just misunderstanding how Odoo treats Datetime?
Thanks DataInteger and Hybrosys for the answers and confirmation!
It indeed seemed like a cache/cookie/JS related issue. I tried log out, opened a new browser tab in incognito mode, accessed Odoo local server, logged in again, and the timezone settings for views and exports seem to work fine as expected now.