We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
timestamp parameters are not UNIX time. Actually, they are 1000 times (milliseconds) of UNIX time.
timestamp
There are two possibilities:
Returned x1000 value of UNIX time.
$ curl -s "https://public.bitbank.cc/btc_jpy/ticker" | jq ".data.timestamp" 1581669923800 $ date +%s 1581669928
$ BITBANK_TIMESTAMP=$(curl -s "https://public.bitbank.cc/btc_jpy/ticker" | jq ".data.timestamp") $ python -c "from datetime import datetime; print(datetime.fromtimestamp($BITBANK_TIMESTAMP))" Traceback (most recent call last): File "<string>", line 1, in <module> ValueError: year 52091 is out of range
$ python -c "from datetime import datetime; print(datetime.fromtimestamp($(($BITBANK_TIMESTAMP / 1000))))" 2020-02-14 17:45:51
The text was updated successfully, but these errors were encountered:
@momijiame
Thank you for the bug report.
implementation is correct / documentation is wrong
This is correct. Fix documentation (update 2020-02-17).
Sorry, something went wrong.
No branches or pull requests
timestamp
parameters are not UNIX time.Actually, they are 1000 times (milliseconds) of UNIX time.
There are two possibilities:
Expected Behavior
Current Behavior
Returned x1000 value of UNIX time.
Steps to Reproduce
$ python -c "from datetime import datetime; print(datetime.fromtimestamp($(($BITBANK_TIMESTAMP / 1000))))" 2020-02-14 17:45:51
Context (Environment)
Detailed Description
The text was updated successfully, but these errors were encountered: