Merged
Conversation
`DateTimeExt::to_batch_interval_start` is reworked into `TimeExt::to_batch_interval_start`. We make it clear that it's not about converting between two time precisions, but aligning a `Time` in whatever time precision to a given `Duration` in that time precision. The single callsite of the old `to_batch_interval_start` is removed, and a few places that were doing their own math to align to batch intervals now use the new `TimeExt` method. Part of #4225
tgeoghegan
added a commit
that referenced
this pull request
Feb 26, 2026
The test-only `Clock::now_aligned_to_precision` is redundant because you can equivalently do `clock.now().to_time()`. See #4400 for discussion.
jcjones
approved these changes
Feb 26, 2026
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.
DateTimeExt::to_batch_interval_startis reworked intoTimeExt::to_batch_interval_start. We make it clear that it's not about converting between two time precisions, but aligning aTimein whatever time precision to a givenDurationin that time precision. The single callsite of the oldto_batch_interval_startis removed, and a few places that were doing their own math to align to batch intervals now use the newTimeExtmethod.Part of #4225