Skip to content

fix: fix failing tests and eliminate naive datetime warnings#4402

Merged
jennifer-richards merged 36 commits intoietf-tools:feat/tzawarefrom
painless-security:jennifer/fix-tzaware-tests
Sep 1, 2022
Merged

fix: fix failing tests and eliminate naive datetime warnings#4402
jennifer-richards merged 36 commits intoietf-tools:feat/tzawarefrom
painless-security:jennifer/fix-tzaware-tests

Conversation

@jennifer-richards
Copy link
Copy Markdown
Member

All tests now pass and no datetime warnings are emitted during the tests.

I've replaced the formerly unused PRODUCTION_TIMEZONE setting with the constant DEADLINE_TZINFO in ietf/utils/timezone.py. The constant is a tzinfo rather than a string. My intention was to use this when silently converting date instances to datetime instances where the current behavior assumes pacific time. In other cases, I've generally let things default to UTC.

That's the intention, but obviously, trust no one when time zones are involved.

Replaces the PRODUCTION_TIMEZONE setting with a constant,
DEADLINE_TZINFO, in ietf.utils.timezone.
@rjsparks
Copy link
Copy Markdown
Member

rjsparks commented Sep 1, 2022

One thought: The DEADLINE_TZINFO idea is invoked when we have endpoint times, but may need to apply for start times as well.

@jennifer-richards
Copy link
Copy Markdown
Member Author

Good point. I meant to use it for any timestamp that represents either end of an interval, including where comparing "today" to endpoints.

@jennifer-richards jennifer-richards merged commit 3205411 into ietf-tools:feat/tzaware Sep 1, 2022
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 5, 2022
@jennifer-richards jennifer-richards deleted the jennifer/fix-tzaware-tests branch September 7, 2022 16:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants