我们正在寻找使用MATLAB帮助UTC时间到字符串的时间转换。
试图从2010年10月末收集的数据文件中提取时间。 数据文件表示将在UTC时间报告。 此字段是约3.02e11的整数字符串值(以毫秒为单位)。 试图转换为字符串,但发生了一些故障。
由于发现单位绝对以毫秒为单位,因此我们将其转换为几分之一天,以便与datenum格式兼容。
如果数据是在10月底(例如2010年10月31日)收集的,我可以推测可能得到的数字。 我觉得2001年1月1日会是个好时代,我会计算我可能得到的数字。 以天为单位:
指定日期=日期(操作器31,2010 ) )。
suspected epoch=datenum (January 1,2001 ) )。
suspectedtimeindays=suspected date-suspected epoch
这是3590。
但是,我的实际时间,以天为单位,出现以下代码
实际时间=3.02 e11
actualtimeindays=3.02 e11/1000/24/3600
例如3495.4。
这令人不安。 区别是94.6 -,不是一年。 这意味着此文件中的文档错误,或距离2001年4月1日近5天。
calculated epoch=suspected date-actualtimeindays
calculatedepochstr=datestr (calculated epoch )
或者,如果纪元是2001年1月1日,则文档中的实际日期从7月底开始。
ifepochisjanuarydate=suspectedepochactualtimeindays
ifepochisjanuarydatestr=datestr (ifepochisjanuarydate ) ) ) ) ) ) ) ) )。
这是已知的UTC格式吗? 有人能就如何从3.02e11幅度的数量中获得10月的日期提出建议吗?