hybridts_to_unixtime()
Near Deprecation此操作将混合时间戳转换为 UNIX 纪元时间戳。
请求语法
python
hybridts_to_unixtime(
hybridts: int,
)
参数:
-
hybridts (int) -
[必需]
一个混合时间戳。
混合时间戳是一个非负整数,范围为 0 到 18446744073709551615。
返回类型:
float
返回: UNIX 纪元时间,它是一个整数,表示自 1970 年 1 月 1 日(UTC 午夜/GMT)起经过的时间,以秒为单位。
示例
python
import time
from pymilvus import utility
# Get a UNIX epoch timestamp
epoch1 = time.time()
# Make a hybrid timestamp
ts = utility.mkts_from_unixtime(epoch1)
# Converts the hybrid timestamp to a UNIX epoch timestamp
epoch2 = utility.hybridts_to_unixtime(ts)
# Asserts the equation
assert epoch1 == epoch2
相关操作
以下操作与 hybridts_to_unixtime() 相关: