为 Webkit (Google Chrome) 时间戳保留多少位?
我知道 Google Chrome 使用整数时间戳,正确地称为 Webkit 时间戳,它是根据自 01/01/1601 00:00:00 UTC 以来的微秒数计算的。我不确定这是一个 64 位有符号整数(这最有意义)还是 56 位整数?
下面是一个时间戳示例:12883423549317375。这会解码为 Sun, 05 April 2009 16:45:49 UTC。关于其工作原理有什么好的参考吗?我搜索了Webkit网站,没有找到这个时间戳的文档。
I know that Google Chrome uses an integer timestamp, properly called the Webkit timestamp, that is calculated by the number of microseconds since 01/01/1601 00:00:00 UTC. What I'm not sure is whether this is a 64-bit signed integer (which would make the most sense) or a 56-bit integer?
Here's an example timestamp: 12883423549317375. This decodes as Sun, 05 April 2009 16:45:49 UTC. Any good reference out there for how this works? I searched the Webkit website and found no documentation of this timestamp.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Chromium 中的时间通常为 内部表示为
int64
。查看base::Time
和各种特定于平台的实现,了解有关如何进行转换的详细信息。Time in Chromium is generally represented internally as an
int64
. Take a look atbase::Time
and the various platform-specific implementations for details about how the conversions take place.此外,由于这些时间戳经常在 SQLite 数据库(在 Chrome 数据中)中找到,我经常必须找到一种即时解码它们的方法。我最常访问的书签之一位于 http: //linuxsleuthing.blogspot.co.uk/2011/06/decoding-google-chrome-timestamps-in.html 告诉您如何在 SQL 中执行此操作 询问。
其中 time 是存储 webkit 时间戳的列的名称。
In addition, as these timestamps are often found in SQLite databases (in Chrome data) I often have to find a way to decode them on-the-fly. One of my most-visited bookmarks is at http://linuxsleuthing.blogspot.co.uk/2011/06/decoding-google-chrome-timestamps-in.html which tells you how to do this as part of an SQL query.
Where time is the name of the column the webkit timestamp is stored in.