Skip to content

Fix undefined pytz reference in schedule_rruleset UNTIL conversion#203

Merged
cigamit merged 1 commit into
ctrliq:mainfrom
blaipr:fix-rruleset-pytz-undefined
Jul 11, 2026
Merged

Fix undefined pytz reference in schedule_rruleset UNTIL conversion#203
cigamit merged 1 commit into
ctrliq:mainfrom
blaipr:fix-rruleset-pytz-undefined

Conversation

@blaipr

@blaipr blaipr commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The pytz-to-zoneinfo migration in Fix schedule_rruleset date-based end_on failing with a UTC UNTIL error #171 missed replacing the pytz call on the UNTIL timezone conversion line (line 297), leaving an undefined name that breaks CI
  • Both ruff (F821 Undefined name 'pytz', 2 occurrences) and ansible-test sanity/pylint (undefined-variable) fail on every push to main
  • Replaced pytz.timezone(...).localize(...).astimezone(pytz.utc) with stdlib ZoneInfo + datetime.timezone.utc

Test plan

  • ruff check plugins/ passes locally
  • Verified the timezone conversion produces correct UTC output
  • CI sanity and lint jobs should pass

The pytz-to-zoneinfo migration in ctrliq#171 missed replacing the pytz call
on the UNTIL timezone conversion line, leaving an undefined name that
breaks both ruff (F821) and ansible-test sanity (pylint).

Use ZoneInfo and datetime.timezone from the stdlib instead.
@cigamit cigamit self-assigned this Jul 11, 2026
@cigamit cigamit added the bug Something isn't working label Jul 11, 2026
@cigamit
cigamit merged commit eb1a5dc into ctrliq:main Jul 11, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

2 participants