是德科技
直播中

王婷婷

7年用户 173经验值
私信 关注
[问答]

时间戳字段的格式是什么

我们有来自benchvue的日志(hdf5),我们将其导入到matlab中。
有人可以告诉我们时间戳字段的格式是什么 - 它似乎不是标准的unix格式。
我们可以使用benchvue将这些日志转换为matlab,但是有数百个并且一次转换它们并不吸引人。
tiA,约翰

以上来自于谷歌翻译


     以下为原文

  We have logs (hdf5) from benchvue which we are importing into matlab. Can someone tell us what the format of the timestamp field is - it doesn't appear to be a standard unix format. We could convert these logs to matlab with benchvue but there are hundreds and converting them one at a time is not appealing.  
TIA,
John  

回帖(2)

王晾其

2018-10-15 11:32:53
嗨John,我们的hdf5文件使用IEEE-1588时间戳。
IEEE-1588是“精确时间协议”,参考1970年1月1日午夜。这是关于它的网页的简介:PTP通常使用与Unix时间相同的时期(午夜,1970年1月1日)。
虽然Unix时间基于协调世界时(UTC)并且受到闰秒的影响,但PTP基于国际原子时(TAI)单调前进。
PTP grandmaster传送UTC和TAI之间的当前偏移量,以便可以根据接收到的PTP时间计算UTC。
布赖恩

以上来自于谷歌翻译


     以下为原文

  Hi John,

Our hdf5 files use IEEE-1588 timestamps. IEEE-1588 is the “Precision Time Protocol”, which is referenced to midnight, Jan. 1, 1970. Here’s a blurb from a web page about it:

PTP typically uses the same epoch as Unix time (Midnight, 1 January 1970). While the Unix time is based on Coordinated Universal Time (UTC) and is subject to leap seconds, PTP is based on International Atomic Time (TAI) that moves forward monotonically. The PTP grandmaster communicates the current offset between UTC and TAI, so that UTC can be computed from the received PTP time.

Brian
举报

陈华

2018-10-15 11:41:11
我有完全相同的问题:我接管了一个包含较旧测量文件的文件夹,它们都以excel和matlab格式提供。时间戳看起来像,例如:
Excel:2016-03-02 08:43:52.632
Matlab:1.310137823106300e + 17
matlab时间戳以1e + 7 /秒的速度增加。
(即08:43:52.632将是1.310137823206300e + 17)
我无法弄清楚引用是什么,或者我如何从该字符串中提取日期值。
谢谢你的帮助!

以上来自于谷歌翻译


     以下为原文

  I have the exact same issue: I took over a folder with older measurement files, they are available both in excel and matlab format.The timestamps look, for example, like this: 
Excel: 2016-03-02 08:43:52.632
Matlab: 1.310137823106300e+17
The matlab timestamp increases with 1e+7 / second. (i.e. 08:43:52.632 would be 1.310137823206300e+17)
I can't figure out what the reference is, or how I can extract a date value from that string. Thanks for helping out!
举报

更多回帖

发帖
×
20
完善资料,
赚取积分