sbertix/Swiftagram

timestamp.date() is return nil in Conversation.openedAt computed variable

mycroftcanner opened this issue · 0 comments

There seems to be a problem with the timestamp to date conversion:

(lldb) p convo["lastSeenAt"].dictionary()?.compactMapValues { $0.timestamp }
([String : ComposableRequest.Wrapper]?) 2 key/value pairs {
[0] = {
key = "5515035060"
value = {
value = "1705343341533999"
}
}
[1] = {
key = "46564563340"
value = {
value = "1705343299192987"
}
}
}
(lldb) p convo["lastSeenAt"].dictionary()?.compactMapValues { $0.timestamp.date() }
([String : Foundation.Date]?) 0 key/value pairs

It would work with converting set to true:

(lldb) p convo["lastSeenAt"].dictionary()?.compactMapValues { $0.timestamp.date(converting: true) }
([String : Foundation.Date]?) 2 key/value pairs {
[0] = (key = "46564563340", value = 2024-01-15 18:28:19 UTC)
[1] = (key = "5515035060", value = 2024-01-15 18:29:01 UTC)
}