bid
,best_bid_quantity
是floats
,target_date
在我的数据库中被设置为timestamp
。在
target_date_time_ms = (k.lastRestRequestTimestamp)
base_datetime = datetime.datetime( 1970, 1, 1 )
delta = datetime.timedelta( 0, 0, 0, target_date_time_ms )
target_date = base_datetime + delta
尝试使用
time.strftime()
:需要使用
.timetuple()
方法将target_date
的datetime.datetime
对象转换为time_struct
结构,然后可以在对time.strftime
的调用中使用该结构。在相关问题 更多 >
编程相关推荐