You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LinkedTZDateTimeField.pre_save calls _convert_value which calls _get_populate_from which does self.timezone = tz. Now the timezone used to save the instance is stored "statically" in the field.
Reading records from the database uses:
def to_python(self, value):
"""Convert the value to the appropriate timezone."""
# pylint: disable=newstyle
value = super(LinkedTZDateTimeField, self).to_python(value)
if not value:
return value
return value.astimezone(self.timezone) # 👈
So the timezone of the last saved instance is applied to all read instances, even if they may have other timezones.
The text was updated successfully, but these errors were encountered:
LinkedTZDateTimeField.pre_save
calls_convert_value
which calls_get_populate_from
which doesself.timezone = tz
. Now the timezone used to save the instance is stored "statically" in the field.Reading records from the database uses:
So the timezone of the last saved instance is applied to all read instances, even if they may have other timezones.
The text was updated successfully, but these errors were encountered: