What is the easiest way to get current GMT time in Unix timestamp format?

前端 未结 10 1219
失恋的感觉
失恋的感觉 2020-12-12 23:19

Python provides different packages (datetime, time, calendar) as can be seen here in order to deal with time. I made a big mistake by

10条回答
  •  天涯浪人
    2020-12-12 23:33

    from datetime import datetime as dt
    dt.utcnow().strftime("%s")
    

    Output:

    1544524990
    

提交回复
热议问题