Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timezone argument for IntervalTrigger #174

Merged

Conversation

@skoranda
Copy link
Contributor

commented Jul 27, 2019

Since the start_date passed into the
apscheduler.triggers.interval.IntervalTrigger instances is explicitly
using UTC the timezone argument needs to be passed with UTC as a value.
Since apscheduler only supports pytz and not datetime.timezone we pass
in timezone=pytz.utc.

All Submissions:

  • [ X] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • [ X] Have you added an explanation of what problem you are trying to solve with this PR?
  • [ X] Have you added information on what your changes do and why you chose this as your solution?
  • Have you written new tests for your changes?

It is not clear there exists any test harness for the scheduler yet.

  • [X ] Does your submission pass tests?

The same tests pass before and after this change (there are currently 8 failing on master and the 1.1.1 tag).

  • This project follows PEP8 style guide. Have you run your code against the 'flake8' linter?

The "new" code is not following flake8 yet.

Add timezone argument for IntervalTrigger
Since the start_date passed into the
apscheduler.triggers.interval.IntervalTrigger instances is explicitly
using UTC the timezone argument needs to be passed with UTC as a value.
Since apscheduler only supports pytz and not datetime.timezone we pass
in timezone=pytz.utc.
@coveralls

This comment has been minimized.

Copy link

commented Jul 27, 2019

Coverage Status

Coverage increased (+0.007%) to 68.446% when pulling 34f9b79 on skoranda:utc_timezone_for_interval_trigger into a7eeafb on IdentityPython:master.

@leifj leifj merged commit 8665002 into IdentityPython:master Jul 28, 2019

4 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.007%) to 68.446%
Details
license/snyk - requirements.txt (SUNET) No manifest changes detected
security/snyk - requirements.txt (SUNET) No manifest changes detected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.