| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Thanks for your contribution! Can you rebase your PR on master? |
Sorry, something went wrong.
|
Sure thing! Just rebased on top of latest master from you. |
Sorry, something went wrong.
|
Thanks for your contribution! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Noticed that in a very specific case, subtracting a negative timedelta yielded different results than adding the same positive timedelta.
I.e. my_dt + timedelta(hours=10) ~= my_dt - timedelta(hours=-10).
Digging into the git log, I found that a similar fix was done for the positive case here: 1ec1ad0.
It seemed logical/symmetrical to do similar with the negative case, although there may have been some good reasons for why _add_timedelta() is different from _subtract_timedelta() that I'm missing.
I also threw in one test case to test specifically subtracting a negative timedelta.
Looking forward to your feedback as always.