Hello,
I have a model with a date field to be an user input, and a computed datetime field. Something like this:
class MyModel(models.Model):
_name = "my.model"
my_date = fields.Datetime(string='My date')
my_datetime = fields.Datetime(string='My datetime', compute='_get_datetime_from_date')
My problem is that the computed datetime is stored according my timezone, for example if I'm on UTC-3 and I enter 01/01/2018 in my_date, my_datetime is computed as 31/12/2017 21:00:00. This is a problem for any datetime behind UTC as it's effectively stored as the day before. I need it to be stored as 01/01/2018 0:00:00. How can I solve this issue?
Thanks a lot.
Can you post the code of _get_datetime_from_date?
Can you post your compute method code ??