Conversation
velazcod
commented
Mar 5, 2026
…ort (rolling, weekly, monthly)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a64ba1932d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| let formatter = ISO8601DateFormatter() | ||
| formatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds] | ||
| if let parsed = formatter.date(from: string) { |
There was a problem hiding this comment.
Accept resetAt timestamps without fractional seconds
This parser only configures ISO8601DateFormatter with .withFractionalSeconds, so common RFC3339 values like 2026-03-05T14:22:00Z fail to parse. In that case parseWindow falls back to resetInSec ?? 0, which makes the usage windows look like they reset immediately even though the API returned a valid reset time. Supporting both fractional and non-fractional ISO8601 forms avoids incorrect reset displays.
Useful? React with 👍 / 👎.
|
Thanks for the PR @velazcod ! A couple comments apart from the one codex pointed out:
|
|
Yeah all good points. TAL |