POSIX timestamp(POSIX时间戳)表示
发表于:
来源:
作者:阿酷
POSIX timestamp称为posix时间戳,也称为unix时间戳。
注意,注意,特别注意
POSIX timestamp表示自1970-01-01 00:00:00以来的秒数,是秒数,是秒数
有是候计算中要特别注意,有时候别的平台返加的时毫秒数。如果在python中直接用fromtimestamp()。调用会报错:
timestamp out of range for platform localtime()/gmtime() function
在python中用fromtimestamp,必须传递的时秒数。如果对方是毫秒数,你要特别处理/1000