Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop serializing timezone-naive datetime as a timezone-aware datetime with UTC tz #36379

Merged
merged 1 commit into from Dec 25, 2023

Conversation

hussein-awala
Copy link
Member

related: #36363

Currently, the timezone-naive datetimes are serialized as timezone-aware dateimes with a timezone UTC, which makes the deserialized values different from the original ones. This PR stops this conversion and serializes the provided datetime as it is.

It's also backward compatible, where the serialized values will be deserialized just like before this change, but it will avoid some unexpected results like the issue explained in #36363.

@bolkedebruin Is there any specific reason for this conversion?

@bolkedebruin
Copy link
Contributor

I really am not a fan of naive datetimes. They just don't make sense as they only exist subjectively. But that being said I think the change is fine and we should aim for integrity.

@hussein-awala hussein-awala merged commit 69f556d into apache:main Dec 25, 2023
51 checks passed
@ephraimbuddy ephraimbuddy added this to the Airflow 2.8.1 milestone Jan 10, 2024
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Jan 10, 2024
ephraimbuddy pushed a commit that referenced this pull request Jan 11, 2024
abhishekbhakat pushed a commit to abhishekbhakat/my_airflow that referenced this pull request Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants