Skip to content

utils: make timestamp validation strict - #39

Open
tllovesxs wants to merge 1 commit into
ZSvirt:mainfrom
tllovesxs:codex/fix-strict-timestamp-validation
Open

tllovesxs wants to merge 1 commit into
ZSvirt:mainfrom
tllovesxs:codex/fix-strict-timestamp-validation

Conversation

@tllovesxs

Copy link
Copy Markdown
Contributor

Summary

  • Make both timestamp validators reject invalid calendar dates.
  • Require the complete input string to match the requested format.
  • Add regression tests for leap-day boundaries, invalid dates, trailing input, and custom formats.

Fixes #33.

Test plan

  • git diff --check
  • Added TestTimeUtilsEdgeCases.
  • Full Maven test execution is currently blocked by the repository's existing JAXB dependency issue on JDK 24.

Copilot AI lite review requested due to automatic review settings September 11, 2026 05:25

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@zsphere-opensource

Copy link
Copy Markdown
Contributor

Thanks for the detailed report and the comprehensive fix.
The changes correctly make both timestamp validators strict by rejecting invalid calendar dates and unconsumed trailing input. The added regression coverage for leap-day boundaries, invalid dates, trailing characters, and custom formats is helpful.
We’ll evaluate the implementation and run the relevant internal validation, including existing callers and null-input behavior. If the validation passes and the change is approved, we’ll integrate it through our internal workflow and synchronize the accepted commit to the public repository while preserving your authorship.
We’ll update this PR once the evaluation is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ZSvirt] bug: TimeUtils timestamp validation accepts invalid dates and trailing input

3 participants