Skip to content

Tweak some of the new pendulum behavior#3907

Merged
gazpachoking merged 1 commit intodevelopfrom
pendulum_tweak
Dec 27, 2023
Merged

Tweak some of the new pendulum behavior#3907
gazpachoking merged 1 commit intodevelopfrom
pendulum_tweak

Conversation

@gazpachoking
Copy link
Copy Markdown
Member

Some of the changes to add timezone aware datetimes weren't fully backwards compatible as intended with 3.11.0. This hopefully fixes those issues and reverts a dubious decision:

  • Dates are no longer cast to datetimes when added as entry fields. Instead, for convenience, the user is allowed to compare a date to a datetime, and at that point the date will be considered to be a datetime at midnight.
  • Anidb reverted to set plain dates, rather than datetimes in tokyo time.
  • now and utcnow template variables are now the special datetimes that allow comparison with naive datetimes and dates.

…ry fields

[change] Allow comparing 'date's to 'datetime's in templates rather than failing. The date will be considered to be at midnight in the same timezone as the datetime.
[fix] These changes fix some templates/if statements that weren't backwards compatible as intended in 3.11.0
@gazpachoking gazpachoking merged commit fcec754 into develop Dec 27, 2023
@gazpachoking gazpachoking deleted the pendulum_tweak branch December 27, 2023 03:48
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.

1 participant