Skip to content

Let _calc take a datetime object instead of a timestamp#168

Merged
potiuk merged 3 commits into
pallets-eco:mainfrom
bdrung:use-timestamp
Jun 22, 2025
Merged

Let _calc take a datetime object instead of a timestamp#168
potiuk merged 3 commits into
pallets-eco:mainfrom
bdrung:use-timestamp

Conversation

@bdrung

@bdrung bdrung commented Jun 21, 2025

Copy link
Copy Markdown
Contributor

Let _calc take and return a datetime object instead of a timestamp. This is a preparation of fixing the DST handling which will need to operate on non-existing wall times.

bdrung added 3 commits June 21, 2025 23:18
Do not change the input parameter `now` in the `_calc` function. This is
a preparation in changing the type of `now`.
Calculate the initial offset on the datetime object instead of a
timestamp (float). This is a preparation in changing the type of `now`.
Let `_calc` take and return a datetime object instead of a timestamp.
This is a preparation of fixing the DST handling which will need to
operate on non-existing wall times.

@potiuk potiuk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice :)

@potiuk potiuk merged commit 0b9591e into pallets-eco:main Jun 22, 2025
7 checks passed
@bdrung bdrung deleted the use-timestamp branch June 23, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants