bug fix in date_to_milliseconds, which getting wrong date(not UTC-0) … #290
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of problem
I working with data from binance in
utc-0
. But, when i try to get some data usingget_historical_klines
, i passstart_str
andend_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 secondsi 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'})