fix(fusion_tasks): make datetime inverses use the same tz resolver as compute
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -781,7 +781,7 @@ class FusionTechnicianTask(models.Model):
|
||||
def _inverse_datetime_start(self):
|
||||
"""When datetime_start is changed (e.g. from calendar drag), update date + time."""
|
||||
import pytz
|
||||
user_tz = pytz.timezone(self.env.user.tz or 'UTC')
|
||||
user_tz = self._get_local_tz()
|
||||
for task in self:
|
||||
if task.datetime_start:
|
||||
local_dt = pytz.utc.localize(task.datetime_start).astimezone(user_tz)
|
||||
@@ -791,7 +791,7 @@ class FusionTechnicianTask(models.Model):
|
||||
def _inverse_datetime_end(self):
|
||||
"""When datetime_end is changed (e.g. from calendar resize), update time_end."""
|
||||
import pytz
|
||||
user_tz = pytz.timezone(self.env.user.tz or 'UTC')
|
||||
user_tz = self._get_local_tz()
|
||||
for task in self:
|
||||
if task.datetime_end:
|
||||
local_dt = pytz.utc.localize(task.datetime_end).astimezone(user_tz)
|
||||
|
||||
Reference in New Issue
Block a user