Skip to content

Commit

Permalink
refactor: Replace pytz usage with zoneinfo module (#2280)
Browse files Browse the repository at this point in the history
  • Loading branch information
Myrausman authored Mar 18, 2024
1 parent 416b4e8 commit de7d336
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion localbuild/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ requirements:
- netcdf4
- hdf4
- pillow
- pytz
- pyqt >=5.15.0
- qt >=5.15.0
- requests >=2.31.0
Expand Down
4 changes: 2 additions & 2 deletions tests/_test_mscolab/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import pytest
import datetime
import textwrap
import pytz
from zoneinfo import ZoneInfo

from mslib.mscolab.server import register_user
from mslib.mscolab.models import AwareDateTime, User, Permission, Operation, Message, Change
Expand All @@ -48,7 +48,7 @@ def test_aware_datetime_conversion():
result_none = aware_datetime_type.process_bind_param(None, None)
assert result_none is None

cet_time = datetime.datetime.now(tz=pytz.timezone("CET"))
cet_time = datetime.datetime.now(tz=ZoneInfo("CET"))
result_cet = aware_datetime_type.process_bind_param(cet_time, None)
assert result_cet == cet_time
assert result_cet is not None
Expand Down

0 comments on commit de7d336

Please sign in to comment.