DJ-73: Migrate backend off Joda-Time to java.time + relative frontend timestamps - #210
Open
devin-ai-integration[bot] wants to merge 6 commits into
Open
Conversation
…to devin/dj73-joda-time-migration-relative-timestamps
…e' into devin/dj73-joda-time-migration-relative-timestamps
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Pays down the tech debt in DJ-73 in two workstreams merged into one branch:
Backend — joda-time removed entirely.
joda-time:2.10.13dropped frombuild.gradle; allorg.joda.time.DateTimeusages replaced withjava.time.Instantacross the domain (Article,Comment), DTOs (ArticleData,CommentData), query services, GraphQL datafetchers, the MyBatisDateTimeHandler,DateTimeCursor, and tests. The API date contract is preserved byte-for-byte:JacksonCustomizationsnow serializesInstantwithwhich emits exactly the same ISO-8601 output as joda's
ISODateTimeFormat.dateTime().withZoneUTC()(millisecond precision + literalZ, e.g.2026-07-29T20:29:12.000Z) — verified by diffingcurl http://localhost:8080/articlesagainst a pre-migration baseline (identical after normalizing reseeded timestamp values).DateTimeCursorstill round-trips epoch millis andDateTimeHandlerkeeps the same UTC-calendarTimestampstorage, so pagination and existing SQLite data behave unchanged.Frontend — relative timestamps. New
frontend/lib/utils/relativeTime.tsusing the built-inIntl.RelativeTimeFormat(no new dependencies; "just now" under 45s, otherwise the largest sensible unit).ArticlePreview,ArticleMeta, andCommentnow render relative times (e.g. "2 days ago") with the absolute date in atitletooltip.Before / After (home feed)
Verification
./gradlew clean test spotlessCheck: 68 tests pass, spotless clean.jacocoTestCoverageVerificationfails at 0.33 vs the 0.80 gate — preexisting onmain(0.3315 baseline vs 0.3322 on this branch, i.e. slightly improved).npm run buildpasses.grep -ri joda build.gradle srcreturns nothing.Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/b9fa4a7174334d65b2e60d863b4e5843
Requested by: @HJscarr