Skip to content

Commit

Permalink
remove pytz dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
keotl committed Oct 2, 2022
1 parent bf46d6d commit 7d28aec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions 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
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -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'],
)

0 comments on commit 7d28aec

Please sign in to comment.