Skip to content

Commit

Permalink
add tzdata option (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
ringsaturn authored Sep 15, 2024
1 parent 3466d26 commit 1caba10
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ requires-python = ">=3.8"

[project.optional-dependencies]
pytz = ["pytz>=2024.2"]
tzdata = ["tzdata>=2024.1"]

[project.urls]
Documentation = "https://github.com/ringsaturn/tzfpy"
Expand Down
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ pytest-benchmark
pytest-cov
pytest-pretty
pytz==2024.2
tzdata==2024.1
6 changes: 6 additions & 0 deletions tests/test_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ def test_with_pytz(self):
for tz in timezonenames():
timezone(tz)

def test_with_tzdata(self):
from zoneinfo import ZoneInfo

for tz in timezonenames():
ZoneInfo(tz)

def test_no_empty(self):
for city in all_cities():
tznames = get_tzs(city.lng, city.lat)
Expand Down

0 comments on commit 1caba10

Please sign in to comment.