Datetime format in Messages

Does anyone have an idea in which format the data from Messages is? This is a datetime in the message table

and this is a date in the attachments table:

Could it be that the first line shows:

Thursday, 31. May 2018 12:11:45

Then you would have to deduct 621355968000000000 (ticks between 01.01.0001 and 01.01.1970).

I forgot to add that the dates are from early this morning.

Maybe:

import Foundation

// using current date and time as an example
let someNSDate = NSDate() 

// convert NSDate to NSTimeInterval (typealias for Double)
let timeInterval = someNSDate.timeIntervalSinceReferenceDate

// convert to Integer
let myInt = Int(timeInterval)
print(myInt)

Could be. But that isn’t quite there, yet. According to ChatGPT 753085511345636608 is 30.03.2024 and not today.

I thought your timestamps are from this morning?

But then again, what does ChatGPT know (o;

Der Witz ist schon alt.

Since High-Sierra:

Var utc As New TimeZone(0)

Var nanosecsSince2001 As Int64 = 753085511345636608    // Nanosecs UTC since 2001
Var nanosecsSince1970forXojo As Int64 = nanosecsSince2001 + 978307200000000000
Var secsSince1970 As Double = nanosecsSince1970forXojo / 1000000000

Var xojoDateTime As New DateTime(secsSince1970, utc)
MessageBox xojoDateTime.SQLDateTime+" GMT+00:00"
Quit
3 Likes