bug fix in date_to_milliseconds, which getting wrong date(not UTC-0) …#290
Open
denis-sukhoverkhov wants to merge 1 commit intosammchardy:masterfrom
Open
bug fix in date_to_milliseconds, which getting wrong date(not UTC-0) …#290denis-sukhoverkhov wants to merge 1 commit intosammchardy:masterfrom
denis-sukhoverkhov wants to merge 1 commit intosammchardy:masterfrom
Conversation
…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.
Author
|
I am not understand, how this error(python3.3) related with my code. |
|
@denis-sukhoverkhov this is not bug. please read the api docs carefully it don't allow timestamp string. |
Contributor
|
@xiaods is this irrelevant now? i will close this PR if so. |
need @denis-sukhoverkhov double check. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_strandend_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
1527300000it 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'})