Parsing “date” field of iPhone SMS file from backup

后端 未结 8 1513
感动是毒
感动是毒 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:04

    I don't know about getting the correct date given two versions present, but when I did this today, I noticed the date column was not the standard unix time but a longer number with seemingly nine zeros at the end, like 444548608000000000. This is what I did to get the correct date:

    select
        datetime(substr(date, 1, 9) + 978307200, 'unixepoch', 'localtime') as f_date,
        text
    from message
    

提交回复
热议问题