Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Base

Entity: res.partner

Compute Method: _compute_tz_offset

View 19.0 View 20.0
Inputs Method Outputs
  • tz
for partner in self:
-             partner.tz_offset = datetime.datetime.now(pytz.timezone(partner.tz or 'GMT')).strftime('%z')
+             partner.tz_offset = datetime.datetime.now(ZoneInfo(partner.tz or 'UTC')).strftime('%z')
  • tz_offset

Back to entity