Post #2686025
2026-04-24 11:52 UTC
Switching to ISO8601DateFormatter resolved the bug (the differing behaviour I was seeing with plain DateFormatter). I never found a root cause of why it failed to parse the same dates on different users’ devices, which means I can’t guard against the bug except by avoiding DateFormatter.
Thanks to everyone who responded!
Replies (1)
-
@daniel@social.telemetrydeck.com 2026-04-24 12:28
@ashfurrow@tenforward.social aah I saw this too late, but I do a lot of work with dateformatters and I've also seen this behaviour, so I comiserate. I have no clue as to the root cause, but what I've taken to doing is explicitly enabling fractional seconds for the formatter, and that seems to help: let formatter = ISO8601DateFormatter() formatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds]