Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Added the
walltimedeltafunction to thedateutil.tzutilsmodule to calculate wall time differences between two datetime objects, accounting for daylight saving time (DST) transitions, as per issue #1039. The function converts datetimes to UTC usingdateutil.tz.resolve_imaginaryto handle ambiguous or imaginary times and supports naive datetimes with a provided timezone. Comprehensive tests cover DST transitions, naive datetimes, and error cases. Supporting scripts ensure proper module setup and test execution.Key changes:
src/dateutil/tzutils.pywith thewalltimedeltafunction.tests/test_tzutils.pyandtests/test_isolated_tzutils.py.src/dateutil/__init__.pyto exporttzutils.changelog.d/1039.feature.rst.fix_installation.sh,install_for_testing.sh,install_tzutils.py,skip_property_tests.py,update_module.sh.ModuleNotFoundErrorfortzutils,hypothesis, andfreezegun;PytestUnknownMarkWarningforno_cover; andtest_gettz_returns_localfailure.Closes #1039