Open jeffreyhanna opened 7 years ago
This is a high priority item for us. The issue is that our current timestamp precision on the backend is up to 6 decimal places for seconds. The following example shows how that can cause comparisons to fail:
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSSSSS"
let date1 = Date()
let date1String = dateFormatter.string(from: date1)
let date2 = dateFormatter.date(from: date1String)!
print(date1.compare(date2) == .orderedSame) // prints false
We're working on a solution and will update this ticket when a fix is available in the SDK. Thank you for your patience and understanding. Please upvote this issue if it currently affects you!
Overview
Dates received from Stackberry are sometimes slightly different than the date that was sent due to a precision issue.
Steps to Reproduce
Issue
Date might be slightly modified due to a precision issue
Desired Result
I should be able to compare dates without having to add a tolerance