Skip to content

Refactor/java datetime alignment#97

Merged
cbullinger merged 4 commits intomongodb:developmentfrom
ozgliderpilot:refactor/java-datetime-alignment
Apr 17, 2026
Merged

Refactor/java datetime alignment#97
cbullinger merged 4 commits intomongodb:developmentfrom
ozgliderpilot:refactor/java-datetime-alignment

Conversation

@ozgliderpilot
Copy link
Copy Markdown
Contributor

@ozgliderpilot ozgliderpilot commented Apr 15, 2026

NB: This PR should be reviewed after #96 is reviewed and merged as it is stacked on it.

This implements the general java + mongo recommendations:

  • Use Instant + BSON DateTime as the default for persisted timestamps and business events that care about "when did this happen?"
  • Use LocalDate for "date only" concepts
  • Use LocalTime for recurring "time-of-day only" rules
  • Use LocalDateTime for human-scheduled local events (especially far-future appointments) and policies defined in local wall-clock terms, stored alongside an explicit ZoneId when you ultimately need a real instant

It also improves the integration test making it part of CICD with the test containers.

@ozgliderpilot ozgliderpilot marked this pull request as draft April 15, 2026 06:23
@ozgliderpilot ozgliderpilot marked this pull request as ready for review April 15, 2026 06:41
Copy link
Copy Markdown
Collaborator

@cbullinger cbullinger left a comment

Choose a reason for hiding this comment

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

Can we add a new test for a round-trip of the released field through MongoDB; i.e. verify the released BSON values don't shift when read as LocalDate? probably fine for this dataset, but just a sanity check

Otherwise, this all looks great.

@ozgliderpilot ozgliderpilot force-pushed the refactor/java-datetime-alignment branch from a6df9f8 to 5458032 Compare April 16, 2026 03:15
@ozgliderpilot ozgliderpilot force-pushed the refactor/java-datetime-alignment branch from 5458032 to 686cb2c Compare April 16, 2026 03:28
Copy link
Copy Markdown
Collaborator

@cbullinger cbullinger left a comment

Choose a reason for hiding this comment

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

This is great! Just a comment on the dead testcontainers.version property, but otherwise LGTM!

Comment thread mflix/server/java-spring/pom.xml
Comment thread mflix/server/java-spring/pom.xml
… to be compatible with the latest Docker release
@cbullinger cbullinger merged commit c8a4357 into mongodb:development Apr 17, 2026
2 checks passed
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.

2 participants