Skip to content

Handle out-of-range DateTimeField values#138

Merged
Oleg-Melnik merged 4 commits into
masterfrom
fix-datetime-field-range
Jul 22, 2026
Merged

Handle out-of-range DateTimeField values#138
Oleg-Melnik merged 4 commits into
masterfrom
fix-datetime-field-range

Conversation

@Oleg-Melnik

@Oleg-Melnik Oleg-Melnik commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Fixes #123.

Summary

  • validate converted date-time instants against the Protobuf Timestamp range;
  • report unsupported boundary values as normal field parsing errors;
  • add deterministic lower-bound, upper-bound, and normal-value tests;
  • bump Chords to 2.0.0-SNAPSHOT.92 and regenerate dependency reports.

Root cause

DateTimeField converted local input through the current zone offset and passed the resulting milliseconds to Timestamps.fromMillis(). Boundary values such as 0001-01-01 00:00 can fall outside Protobuf's supported UTC range after applying a positive offset, causing an IllegalArgumentException to escape the field parser.

Impact

Out-of-range date-time values now leave the field invalid with a clear validation message instead of triggering an unexpected-exception dialog. Valid date-time parsing and formatting remain unchanged.

@Oleg-Melnik Oleg-Melnik self-assigned this Jul 22, 2026
@Oleg-Melnik
Oleg-Melnik marked this pull request as ready for review July 22, 2026 23:07
@Oleg-Melnik
Oleg-Melnik requested review from armiol and dpikhulya July 22, 2026 23:10
@Oleg-Melnik
Oleg-Melnik merged commit 8dc571f into master Jul 22, 2026
5 checks passed
@Oleg-Melnik
Oleg-Melnik deleted the fix-datetime-field-range branch July 22, 2026 23:38
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.

DateField: entering certain value(s) throws an exception

2 participants