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

_add_timedelta broken #625

Closed
jacobg opened this issue Jun 8, 2022 · 3 comments
Closed

_add_timedelta broken #625

jacobg opened this issue Jun 8, 2022 · 3 comments

Comments

@jacobg
Copy link

jacobg commented Jun 8, 2022

https://github.com/sdispater/pendulum/blob/f1df7dc3f838bd4ab1075ba25c8b6ce5d8141995/pendulum/datetime.py#L656

The pull request #482 breaks the following:

>>> dt = pendulum.DateTime(2022, 6, 8, 13, 21, 12, 239829, tzinfo=pendulum._Timezone('America/New_York'))
>>> dt._add_timedelta(datetime.timedelta(seconds=3600))
DateTime(2022, 6, 8, 14, 21, 12, 239829, tzinfo=Timezone('America/New_York'))

The _add_timedelta call is a no-op.

@jacobg
Copy link
Author

jacobg commented Jun 8, 2022

@sdispater

@jacobg
Copy link
Author

jacobg commented Jun 8, 2022

The problem is it's calling pendulum.Date.add_timedelta instead of pendulum.DateTime.add_timedelta, even though it's a DateTime object.

@jacobg
Copy link
Author

jacobg commented Jun 8, 2022

@jacobg jacobg closed this as completed Jun 8, 2022
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

No branches or pull requests

1 participant