Post #2226263
2026-04-21 21:19 UTC
Replies (3)
-
@ashfurrow@tenforward.social 2026-04-24 11:52
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!
-
@brunoph@breakpoint.cafe 2026-04-21 21:20
@ashfurrow@tenforward.social I recall having issues with date strings that would sometimes have fractional milliseconds and sometimes not, and the same formatter wouldn't be able to decode both, so I had to have a fallback to handle the opposite case. It's been a long while tho, so details are hazy in my memory.
-
@designatednerd@mastodon.social 2026-04-24 01:45
@ashfurrow@tenforward.social any particular reason you're not using this guy since that looks to me like an ISO8601 compliant date? https://developer.apple.com/documentation/foundation/iso8601dateformatter