fix: display download email date ranges in UTC - #330
Merged
Conversation
grojeda
commented
Aug 20, 2026
Contributor
utas-raymondng
requested changes
Aug 20, 2026
Collaborator
There was a problem hiding this comment.
Maybe it is easier to use -Duser.timezone=UTC to force the java app to assume UTC, so we do not need to change code to handle it? That said we still need to update the display format
This is control by the github/aodn/appDeploy project, i can show you with Zoom
| try { | ||
| return !java.time.LocalDate.parse(date.trim(), ISO_DATE_FORMAT).isBefore(java.time.LocalDate.now()); | ||
| } catch (java.time.format.DateTimeParseException e) { | ||
| return !LocalDate.parse(date.trim(), ISO_DATE_FORMAT).isBefore(LocalDate.now(ZoneOffset.UTC)); |
Collaborator
There was a problem hiding this comment.
This may not correct if timezone is use in this case when machine is running in Mel (ap-southeast). Lets say
- If your input date is Friday's date (local Australian time), LocalDate.parse() treats it as Friday and UTC
- LocalDate.now(ZoneOffset.UTC) will say it is Thursday.
- For several hours every morning in Australia, local "today" will not match UTC "today"
…capi-java into bugfix/9062-email-date-range-utc
utas-raymondng
requested changes
Aug 21, 2026
utas-raymondng
left a comment
Collaborator
There was a problem hiding this comment.
One minor comment
| ); | ||
|
|
||
| assertTrue(result.contains("05 Jan 2024 - 31 Dec 2024"), "Expected dd MMM yyyy date format"); | ||
| void testDatesShowInclusiveUtcRangeInNonUtcServerTimezone() { |
Collaborator
There was a problem hiding this comment.
Is this test needed or should be replace by test that check system time is UTC by default?
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.