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

start/end timezone issue #40

Closed
SHSauler opened this issue Feb 9, 2018 · 3 comments
Closed

start/end timezone issue #40

SHSauler opened this issue Feb 9, 2018 · 3 comments

Comments

@SHSauler
Copy link
Contributor

SHSauler commented Feb 9, 2018

Dates miss tzinfo just by providing %Y-%m-%d and error gets raised:

    raise ValueError('%s.tzinfo must not be None!' % varname)

Fixed it with

import pytz
[...]
poll_from = datetime.strptime(args.start, "%Y-%m-%d%Z").replace(tzinfo=pytz.utc)

But then only UTC can be selected. Would this be okay? Then I'll submit this as PR.

Kind regards!

@FloatingGhost
Copy link
Member

oh goodie timezones, my favourite

gimme 5 I'll fix it

@FloatingGhost
Copy link
Member

Added --tz option in 5233759

e.g

python3 scripts/run-taxii-poll.py -s --tz Europe/London

Defaults to UTC if not provided

@SHSauler
Copy link
Contributor Author

Thank you kindly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants