Skip to content

Conversation

@Frosty2500
Copy link

@Frosty2500 Frosty2500 commented Dec 1, 2025

See here for the adaption of last_update, here for DateTimeUTC

@Frosty2500 Frosty2500 changed the title add DataTimeUTC, adapt last_update to be optional add DataTimeUTC Dec 4, 2025
@s-heppner s-heppner changed the title add DataTimeUTC add DateTimeUTC Dec 5, 2025
Comment on lines +1315 to +1318
if ((last_update and last_update.tzinfo and
last_update.tzinfo.utcoffset(last_update) != timezone.utc.utcoffset(None))
or (last_update and last_update.tzinfo is None)):
raise ValueError("Last update must be in UTC!")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a feeling, I'd say this check should be before the attribute self.last_update is written.
However, this whole thing seems a little hacky, maybe we should discuss this in our next meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants