久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<tfoot id='gMnli'></tfoot>
<i id='gMnli'><tr id='gMnli'><dt id='gMnli'><q id='gMnli'><span id='gMnli'><b id='gMnli'><form id='gMnli'><ins id='gMnli'></ins><ul id='gMnli'></ul><sub id='gMnli'></sub></form><legend id='gMnli'></legend><bdo id='gMnli'><pre id='gMnli'><center id='gMnli'></center></pre></bdo></b><th id='gMnli'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='gMnli'><tfoot id='gMnli'></tfoot><dl id='gMnli'><fieldset id='gMnli'></fieldset></dl></div>

    <small id='gMnli'></small><noframes id='gMnli'>

      <legend id='gMnli'><style id='gMnli'><dir id='gMnli'><q id='gMnli'></q></dir></style></legend>
          <bdo id='gMnli'></bdo><ul id='gMnli'></ul>

        從 Binance-API (Python) 計算時間戳之外的日期

        Compute Date out of Timestamp from Binance-API (Python)(從 Binance-API (Python) 計算時間戳之外的日期)
        <legend id='SHcj0'><style id='SHcj0'><dir id='SHcj0'><q id='SHcj0'></q></dir></style></legend><tfoot id='SHcj0'></tfoot>

          <bdo id='SHcj0'></bdo><ul id='SHcj0'></ul>

                  <tbody id='SHcj0'></tbody>

                <i id='SHcj0'><tr id='SHcj0'><dt id='SHcj0'><q id='SHcj0'><span id='SHcj0'><b id='SHcj0'><form id='SHcj0'><ins id='SHcj0'></ins><ul id='SHcj0'></ul><sub id='SHcj0'></sub></form><legend id='SHcj0'></legend><bdo id='SHcj0'><pre id='SHcj0'><center id='SHcj0'></center></pre></bdo></b><th id='SHcj0'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='SHcj0'><tfoot id='SHcj0'></tfoot><dl id='SHcj0'><fieldset id='SHcj0'></fieldset></dl></div>

                <small id='SHcj0'></small><noframes id='SHcj0'>

                  本文介紹了從 Binance-API (Python) 計算時間戳之外的日期的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我從 Binance-API 收到服務器時間,我嘗試使用它,它看起來像這樣:

                  I received the servertime from the Binance-API,I try to work with and it looks like this:

                  {
                    "serverTime": 1518440400000
                  }
                  

                  問題是,我怎樣才能從這張郵票中計算出日期?

                  The question is, how can I compute the date out of this stamp?

                  我試過了

                  import datetime
                  
                  print(datetime.datetime.fromtimestamp(
                         int("1518308894652")).strftime('%Y-%m-%d %H:%M:%S'))
                  

                  但日期無效.

                  你有什么想法,還是具體的?謝謝!

                  Do you have ideas, or is it to specific? Thank you!

                  推薦答案

                  你可以這樣用:

                  from datetime import datetime
                  datetime.fromtimestamp(int("1518308894652"))
                  

                  但是 python 說年份超出范圍(可以理解,考慮到它說它是 50087).所以我懷疑 serverTime 不是正常的時間戳.

                  But python says the year is out of range (understandably, considering it says it's 50087). So I suspect that serverTime is not a normal timestamp.

                  但假設您得到的響應是時間戳,所以除了將字符串轉換為 int 之外,您不需要進行任何其他轉換.

                  But assuming the response that you got was the timestamp, so you don't need to do any other conversions other than turning the string into an int.

                  原來文檔說所有時間和時間戳相關的字段都以毫秒為單位".所以只需將響應除以 1000 就可以了:datetime.fromtimestamp(int("1518308894652")/1000).來源

                  Turns out the docs say "All time and timestamp related fields are in milliseconds." So just divide the response by 1000 and you'll be fine: datetime.fromtimestamp(int("1518308894652")/1000). Source

                  這篇關于從 Binance-API (Python) 計算時間戳之外的日期的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  python: Two modules and classes with the same name under different packages(python:不同包下同名的兩個模塊和類)
                  Configuring Python to use additional locations for site-packages(配置 Python 以使用站點包的其他位置)
                  How to structure python packages without repeating top level name for import(如何在不重復導入頂級名稱的情況下構造python包)
                  Install python packages on OpenShift(在 OpenShift 上安裝 python 包)
                  How to refresh sys.path?(如何刷新 sys.path?)
                  Distribute a Python package with a compiled dynamic shared library(分發帶有已編譯動態共享庫的 Python 包)

                  1. <legend id='iiM9n'><style id='iiM9n'><dir id='iiM9n'><q id='iiM9n'></q></dir></style></legend>
                    • <tfoot id='iiM9n'></tfoot>

                      <small id='iiM9n'></small><noframes id='iiM9n'>

                      <i id='iiM9n'><tr id='iiM9n'><dt id='iiM9n'><q id='iiM9n'><span id='iiM9n'><b id='iiM9n'><form id='iiM9n'><ins id='iiM9n'></ins><ul id='iiM9n'></ul><sub id='iiM9n'></sub></form><legend id='iiM9n'></legend><bdo id='iiM9n'><pre id='iiM9n'><center id='iiM9n'></center></pre></bdo></b><th id='iiM9n'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='iiM9n'><tfoot id='iiM9n'></tfoot><dl id='iiM9n'><fieldset id='iiM9n'></fieldset></dl></div>
                        <tbody id='iiM9n'></tbody>

                            <bdo id='iiM9n'></bdo><ul id='iiM9n'></ul>

                          • 主站蜘蛛池模板: 亚洲一级二级 | 激情福利视频 | 美女综合网 | 在线黄色网 | 免费看一级黄色片 | 福利网址 | 国产欧美日韩综合精品 | 91女人18毛片水多国产 | 91久久精品日日躁夜夜躁欧美 | 成人精品在线观看 | 欧美视频区 | 97超碰在线播放 | 成人做受黄大片 | 国产成人综合在线 | 欧美日韩小视频 | 国产在线天堂 | 日韩精品在线免费观看 | 天天操天| 欧美日韩国产精品 | 亚洲最新网址 | 午夜美女福利视频 | 91av免费在线观看 | 国产日韩一区二区 | 韩日一级片 | 日韩欧美自拍 | 成人av免费看 | 日本一区二区三区免费观看 | 国产黄a三级 | 国产成人高清 | 91理论片午午伦夜理片久久 | 日韩亚洲欧美在线 | 我要看一级片 | 国产美女精品视频 | 亚洲精品网站在线观看 | 吃奶动态图 | 中文字幕理论片 | 大尺度做爰呻吟舌吻网站 | www.午夜| 一区二区三区在线看 | 黄色片一级 | 欧美在线综合 |