Skip to content

Fix misleading RRULE UNTIL timezone mismatch error message - #1640

Open
eroshanbin-glitch wants to merge 3 commits into
dateutil:masterfrom
eroshanbin-glitch:fix-851-rrule-error-message
Open

eroshanbin-glitch wants to merge 3 commits into
dateutil:masterfrom
eroshanbin-glitch:fix-851-rrule-error-message

Conversation

@eroshanbin-glitch

@eroshanbin-glitch eroshanbin-glitch commented Oct 24, 2026 •

Copy link
Copy Markdown

Summary of changes

Fixes #851.

The existing RRULE validation raises a ValueError when DTSTART and UNTIL have inconsistent timezone awareness. However, the error message incorrectly suggests that UNTIL must be specified in UTC, even when UNTIL is already in UTC and the actual problem is a timezone-naive DTSTART.

This pull request:

  • Replaces the misleading error message with a clearer explanation that DTSTART and UNTIL must both be timezone-aware or both be timezone-naive.
  • Preserves the existing validation logic and behavior.
  • Adds a regression test covering both directions of the timezone-awareness mismatch.
  • Adds the contributor to AUTHORS.md.

Testing

The complete test suite was executed locally using:

python -m pytest -q

Before changes:

  • 4,931 passed
  • 386 skipped
  • 17 expected failures

After changes:

  • 4,932 passed
  • 386 skipped
  • 17 expected failures

The targeted regression tests also passed (2 passed).

Python version: 3.13.12

Pull Request Checklist

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

Confusing error message: RRULE UNTIL values must be specified in UTC when DTSTART is timezone-aware

1 participant