duanjin9035 2014-10-13 09:48
浏览 7
已采纳

时间格式和转换

I have an external XML that provides me this times : 34042, 32406.

34042 should be 147 minutes 32406 should be 120 minutes

Do you have any idea what type of time it is and how can I transform into minutes?

I'm parsing XML with PHP and introduce data in Sql

  • 写回答

1条回答 默认 最新

  • douhuigang9550 2014-10-13 10:14
    关注

    Using some intuition and trial and error, I solved the logic behind the encrypted time. The two time values you have are in seconds, with an offset of 7 hours (probably because of time zone).

    7 hours = 25200 seconds.

    Once I subtract the offset from those values, I am left with 8842 and 7206.

    Convert those into minutes and the first value becomes 147 minutes and 22 seconds, the second value becomes 120 minutes and 6 seconds. The values of 147 minutes and 120 minutes are just rounded (or floored) values of the time stamp.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退