Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mycroftcanner opened this issue Jan 15, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mycroftcanner
Copy link

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)
}

@mycroftcanner mycroftcanner added the bug Something isn't working label Jan 15, 2024
@mycroftcanner mycroftcanner changed the title timestamp.date() is return nil timestamp.date() is return nil in Conversation.openedAt computed variable Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants