Parsing “date” field of iPhone SMS file from backup

后端 未结 8 1526
感动是毒
感动是毒 2021-02-02 00:26

While this isn\'t a programming question per se, it IS related.

So I\'m trying to figure out how to parse the SMS DB that gets backed up from the iPhone. I\'m looking at

8条回答
  •  执念已碎
    2021-02-02 01:12

    Since date in mac is calculated from 2001 and not 1970, we have to add some extra to this mac date.

    978307200000 is equivalent to milliseconds until 2001-01-01

    Also multiplying by 1000 is required to convert to milli-seconds.

    macDate * 1000 + 978307200000
    

提交回复
热议问题