Dates format in Message's chat.db I'm working on improving my iMessages backup-script. /Users/Kyro/Library/Messages/chat.db has a table message with all the messages an some dates. 

Any idea what's the date format ? I first thought of a timestamp (I have for example 408978598) but date -r 408978598 return a date in 1982.
I found that as of High Sierra, I needed to use a different date transformation. The 8 extra 0's on the date field versus the date_read field was the clue:

datetime(message.date/1000000000 + strftime("%s", "2001-01-01") ,"unixepoch","localtime")