Phase 3: Migrate from Joda-Time to java.time API #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Phase 3: Migrate from Joda-Time to java.time API
Summary
This PR completes Phase 3 of the Java 17 upgrade by migrating from the legacy Joda-Time library (v2.10.13) to the modern
java.timeAPI. AllDateTimeusages have been replaced withInstantacross 17 files, including:Additionally, fixed a CI blocker by updating GitHub Actions workflow to use v4 instead of deprecated v2 actions.
Key Technical Changes:
DateTime→Instant(UTC-based timestamps)new DateTime()→Instant.now()getMillis()→toEpochMilli()ISODateTimeFormat.dateTime().withZoneUTC().print()→DateTimeFormatter.ISO_INSTANT.format()Timestamp.from()/timestamp.toInstant()joda-time:2.10.13dependencyCI Status: ✅ All checks passing (68 tests, build successful)
Review & Testing Checklist for Human
Recommended End-to-End Test Plan:
Notes
Environment Issue - Spotless Formatting: There's an unresolved issue with the Google Java Format plugin (incompatible with Java 17). The code itself is correct and passes all tests, but may not follow the project's formatting standards. This is an environment configuration issue that needs to be addressed separately.
Regex Patterns: Verified that existing regex patterns (e.g.,
Article.toSlug()) are Java 17 compatible - no changes needed.Session Info: