如何在 Python 中以毫秒为单位创建日期时间? - How do I create a datetime in Python from milliseconds?

问题:

I can create a similar Date object in Java by java.util.Date(milliseconds) .我可以通过java.util.Date(milliseconds)在 Java创建一个类似的 Date 对象。 How do I create the comparable in Python?如何在 Python 中创建可比对象?

Allocates a Date object and initializes it to represent the specified number of milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT.分配一个 Date 对象并将其初始化以表示自称为“纪元”的标准基准时间(即格林威治标准时间 1970 年 1 月 1 日 00:00:00)以来的指定毫秒数。


解决方案:

参考一: https://en.stackoom.com/question/38iR
参考二: https://stackoom.com/question/38iR
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章