Skip to content

Subtracting negative timedelta around DST not same as adding the positive #420

Description

@tomage

Hey! As I've been digging deeper into the Pendulum library, I've discovered one interesting edge-case: Namely that for specific times, subtracting a negative timedelta is not the same as adding the positive one.

Thus, my_dt - my_negative_timedelta is not equal to my_dt + (-my_negative_timedelta).

As before, I took the liberty of throwing together what seemed a sensible patch: #419.

Here's also a pyfiddle, to see this in action: https://pyfiddle.io/fiddle/6a20e200-bb3a-4af9-b336-a216f868487d/.

Thanks!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions