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

bug fix in date_to_milliseconds, which getting wrong date(not UTC-0) … #290

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

denis-sukhoverkhov
Copy link

Description of problem
I working with data from binance in utc-0. But, when i try to get some data using get_historical_klines, i pass start_str and end_str.
And inside of method date string is convert to milliseconds through date_to_milliseconds. And when i try to pass date in timestamp, like this:
klines = client.get_historical_klines("ETHBTC", Client.KLINE_INTERVAL_30MINUTE, "1 Dec, 2017", "1527300000")
where 1527300000 it is '2018-05-26 02:00' in seconds
i getting wrong set of data, where get_historical_klines getting data filtering by my timezone. This bug is only reproduced when using timestamp.
BUG FIXED
dateparser.parse(date_str, settings={'TO_TIMEZONE': 'UTC'})

…when i passed date in timestamp. I getting date with my timezone - it is wrong, because date_to_milliseconds works only with utc-0 datetime-objects.
@coveralls
Copy link

coveralls commented Jun 4, 2018

Coverage Status

Coverage remained the same at 41.272% when pulling a5de83d on denis-sukhoverkhov:master into 852b256 on sammchardy:master.

@denis-sukhoverkhov
Copy link
Author

I am not understand, how this error(python3.3) related with my code.

@xiaods
Copy link

xiaods commented Apr 25, 2020

@kimchirichie
Copy link
Contributor

@xiaods is this irrelevant now? i will close this PR if so.

@xiaods
Copy link

xiaods commented Jan 1, 2021

@xiaods is this irrelevant now? i will close this PR if so.

need @denis-sukhoverkhov double check.

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

Successfully merging this pull request may close these issues.

4 participants