SQLite 文件中的 9 位时间戳
我正在处理来自客户端的 SQLite 文件,发现一列标记为 TIMESTAMP,我过去曾使用 10 位数的 php 时间戳,该文件的时间戳为左侧 9 位数,右侧 6 位数:
I am working on a SQLite file from a client and found a column marked as TIMESTAMP, I have work in the past with php timestamp with 10 digits, this file has time stamps with 9 digits to the left and 6 to the right:
570822838.260406
570822838.544408
570822846.167604
我不知道如何将这些数字转换为日期时间或如何计算它们.有什么帮助吗?谢谢.
I do not know how to convert this numbers to date-times or how are they calculated. Any help? Thanks.
推荐答案
我猜这是一个 Apple Core Data 时间戳,基于这个:
I'd guess it's an Apple Core Data timestamp, based on this:
sqlite> select datetime(570822838.260406, 'unixepoch', '+31 years');
2019-02-02 17:53:58
所以你可以使用上面的转换成标准格式.
So you can use the above to convert to a standard format.
(另外,请查看 这个答案 .)
(Also, check out this answer .)
相关文章