ZEDGR / pychallonge

Python Module for the CHALLONGE API
https://challonge.com/api
BSD 2-Clause "Simplified" License
44 stars 11 forks source link

inconsistent timezone #1

Closed whod81 closed 7 years ago

whod81 commented 7 years ago

Same program ran twice the timezone is different both times.

[ryan@ryanvile fgc]$ ./get_tournament.py | grep start 'group_stages_were_started': False, 'public_predictions_before_start_time': False, 'start_at': datetime.datetime(2017, 2, 28, 11, 35**, tzinfo=<FixedOffset '-05:00' datetime.timedelta(-1, 68400)>),** 'started_at': datetime.datetime(2017, 2, 28, 11, 43, 51, 214000, **tzinfo=<FixedOffset '-05:00' datetime.timedelta(-1, 68400)>),** 'started_checking_in_at': None, 'group_stages_were_started': False, 'public_predictions_before_start_time': False, 'start_at': datetime.datetime(2017, 2, 28, 13, 30, tzinfo=**<FixedOffset '-05:00' datetime.timedelta(-1, 68400)>),** 'started_at': datetime.datetime(2017, 2, 28, 16, 58, 58, 792000, **tzinfo=<FixedOffset '-05:00' datetime.timedelta(-1, 68400)>),** 'started_checking_in_at': None, 'group_stages_were_started': False, 'public_predictions_before_start_time': False, 'start_at': datetime.datetime(2017, 2, 28, 17, 35, tzinfo=**<FixedOffset '-05:00' datetime.timedelta(-1, 68400)>),** 'started_at': datetime.datetime(2017, 2, 28, 18, 2, 39, 53000, **tzinfo=<FixedOffset '-05:00' datetime.timedelta(-1, 68400)>),** 'started_checking_in_at': None, [ryan@ryanvile fgc]$ ./get_tournament.py | grep start 'group_stages_were_started': False, 'public_predictions_before_start_time': False, 'start_at': datetime.datetime(2017, 2, 28, 17, 35, tzinfo=**<FixedOffset '+01:00' datetime.timedelta(0, 3600)>),** 'started_at': datetime.datetime(2017, 2, 28, 17, 43, 51, 214000, **tzinfo=<FixedOffset '+01:00' datetime.timedelta(0, 3600)>),** 'started_checking_in_at': None, 'group_stages_were_started': False, 'public_predictions_before_start_time': False, 'start_at': datetime.datetime(2017, 2, 28, 19, 30, **tzinfo=<FixedOffset '+01:00' datetime.timedelta(0, 3600)>),** 'started_at': datetime.datetime(2017, 2, 28, 22, 58, 58, 792000, **tzinfo=<FixedOffset '+01:00' datetime.timedelta(0, 3600)>),** 'started_checking_in_at': None, 'group_stages_were_started': False, 'public_predictions_before_start_time': False, 'start_at': datetime.datetime(2017, 2, 28, 23, 35, tzinfo=**<FixedOffset '+01:00' datetime.timedelta(0, 3600)>),** 'started_at': datetime.datetime(2017, 3, 1, 0, 2, 39, 53000, **tzinfo=<FixedOffset '+01:00' datetime.timedelta(0, 3600)>),** 'started_checking_in_at': None,

ZEDGR commented 7 years ago

I think this problem is from challonge. I will investigate more in the next few days maybe I will introduce the timezone parameter.

ZEDGR commented 7 years ago

Thanks for reporting. Fixed by https://github.com/ZEDGR/pychal/commit/05b620135ac8a8d2f071539cc3e68349bf6d3226

Uninstall pychal and install using the following: pip install -e git+http://github.com/ZEDGR/pychal#egg=pychal

I will upload a new version on pypi soon.