diff --git a/jivago/scheduling/cron_schedule.py b/jivago/scheduling/cron_schedule.py index aa63860..9f86429 100644 --- a/jivago/scheduling/cron_schedule.py +++ b/jivago/scheduling/cron_schedule.py @@ -1,6 +1,5 @@ -from datetime import datetime +from datetime import datetime, timezone -import pytz from croniter import croniter from jivago.lang.annotations import Override @@ -11,7 +10,7 @@ class CronSchedule(Schedule): def __init__(self, cron_string: str, start_time: datetime): if start_time: - self.iterator = croniter(cron_string, start_time=start_time.astimezone(pytz.UTC)) + self.iterator = croniter(cron_string, start_time=start_time.astimezone(timezone.utc)) else: self.iterator = croniter(cron_string) diff --git a/setup.py b/setup.py index 19d718a..00d0e66 100644 --- a/setup.py +++ b/setup.py @@ -61,5 +61,5 @@ def read_version_from_git() -> str: exclude=['contrib', 'docs', 'test', 'test.*' 'tests', 'tests.*', 'example_app', 'example_app.*', 'test_data', 'test_data.*', 'test_utils', 'test_utils.*', 'e2e_test', 'e2e_test.*']), - install_requires=['Jinja2', 'croniter', 'pyyaml', 'werkzeug', 'pytz'], + install_requires=['Jinja2', 'croniter', 'pyyaml', 'werkzeug'], )