Replace pytz with standard library timezone (#16197)

Refactored code to use Python's built-in datetime.timezone and zoneinfo instead of pytz for timezone handling. This modernizes the codebase and removes the dependency on pytz, aligning with current best practices for timezone-aware datetime objects.
This commit is contained in:
Hao Liu
2026-01-09 16:05:08 -05:00
committed by GitHub
parent dbe979b425
commit fee71b8917
5 changed files with 23 additions and 30 deletions

View File

@@ -22,10 +22,6 @@ filterwarnings =
once:datetime.datetime.utcfromtimestamp\(\) is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC:DeprecationWarning
# NOTE: the following are present using python 3.11
# FIXME: Set `USE_TZ` to `True`.
# Note: RemovedInDjango50Warning may not exist in newer Django versions
ignore:The default value of USE_TZ will change from False to True in Django 5.0. Set USE_TZ to False in your project settings if you want to keep the current default behavior.
# FIXME: Delete this entry once `pyparsing` is updated.
once:module 'sre_constants' is deprecated:DeprecationWarning:_pytest.assertion.rewrite