Skip to content

parsedate: minor simplifications - #23417

Closed
bagder wants to merge 2 commits into
masterfrom
bagder/simpler-dateparser
Closed

bagder wants to merge 2 commits into
masterfrom
bagder/simpler-dateparser

Conversation

@bagder

@bagder bagder commented Oct 15, 2026

Copy link
Copy Markdown
Member
  • remove the number state
  • drop a local variable
  • drop checks that can't trigger
  • move the day of month check
  • combine the struct when validity checks
  • keep the time of day in seconds only

- remove the number state
- drop a local variable
- drop checks that can't trigger
- move the day of month check
- combine the struct when validity checks
- keep the time of day in seconds only

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The incorrect seconds-per-day constant causes parsed timestamps to drift from their correct values.

1 open finding
What changed in this PR

Simplifies curl’s date parser by reducing parsing state and consolidating validation.

Changes:

  • Stores time of day as seconds.
  • Removes numeric parsing state and simplifies name matching.
  • Combines date validity checks.
File Description
lib/​parsedate.c Simplifies date parsing, validation, and epoch conversion.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/parsedate.c Resolved
@bagder
bagder marked this pull request as ready for review October 15, 2026 13:36
@testclutch

Copy link
Copy Markdown

Analysis of PR #23417 at f58e5274:

Test 77 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 292 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

Test 78 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 292 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

Test 141 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 288 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

Test 249 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 292 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

Test 517 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 289 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

Test 762 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 154 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

Test 1044 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 146 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

There are more failures, but that's enough from Gha.

Test 1126 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 160 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

Test 1127 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 160 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

Test 1128 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 160 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

Test 1239 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 160 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

Test 1424 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 160 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

Test 1443 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 146 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

Test 1444 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 146 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

There are more failures, but that's enough from Circle.

Generated by Testclutch

hahaha

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@bagder bagder closed this in 653f7d7 Oct 15, 2026
@bagder
bagder deleted the bagder/simpler-dateparser branch October 15, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants