Open
Conversation
a81d95d to
3517451
Compare
3517451 to
4b22406
Compare
BenMorel
reviewed
Oct 1, 2023
Comment on lines
+247
to
+252
| /** | ||
| * Converts this LocalDateRange to Interval instance. | ||
| * | ||
| * The result is Interval from 00:00 start date and 00:00 end date + one day (because end in Interval is exclude) | ||
| * in the given time-zone. | ||
| */ |
Member
There was a problem hiding this comment.
Suggested change
| /** | |
| * Converts this LocalDateRange to Interval instance. | |
| * | |
| * The result is Interval from 00:00 start date and 00:00 end date + one day (because end in Interval is exclude) | |
| * in the given time-zone. | |
| */ | |
| /** | |
| * Converts this LocalDateRange to an Interval in the given TimeZone. | |
| * | |
| * The result is an Interval from 00:00 on the start date to 00:00 on the end date + one day | |
| * (the end Instant of Interval being exclusive). | |
| */ |
Member
There was a problem hiding this comment.
Also, should we add a warning relative to this?
As to what happens if 00:00 falls within a DST transition (I'm not even sure if this is possible in any timezone).
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.
Converting
LocalDateRangetoIntervalis a common task in my app. Typically, I have a method to generate reports that expects aLocalDateRangeargument. Subsequently, I need to transform it for SQL queries using theBETWEENoperator. It’s important to note that the timezone in my database differs from the implied timezone inLocalDateRange.The new method introduced will transform any
LocalDateRangeinto anIntervalin the specified timezone.