Pass configured locale to SimpleDateFormat in DateTimeConverter#421
Merged
garydgregory merged 2 commits intoJul 18, 2026
Merged
Conversation
garydgregory
requested changes
Jul 17, 2026
garydgregory
left a comment
Member
There was a problem hiding this comment.
Hi @rootvector2 Please see my comment.
| /** | ||
| * Test that a configured Locale is honored when a pattern is also set. | ||
| */ | ||
| @Test |
Member
There was a problem hiding this comment.
Use JUnit Pioneer to set a temporary Locale.
Contributor
Author
There was a problem hiding this comment.
Done, switched the test to Pioneer's @DefaultLocale and dropped the manual save/restore. Added junit-pioneer as a test dependency since it wasn't in the pom yet (version comes from commons-parent). All 9 subclass runs still pass.
garydgregory
added a commit
that referenced
this pull request
Jul 18, 2026
Member
|
TY @rootvector2 Merged 🚀 Please port to 1.x if appropriate. |
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.
getFormat(String)builds the patternSimpleDateFormatwith the jvm default locale and ignores the converter's configuredlocale, so a converter given bothsetLocaleand a pattern parses and formats month and day names in the default locale instead of the configured one; passlocalewhen it is set, matchingDateLocaleConverterandStringLocaleConverter. found auditing locale handling across the date converters.mvn; that'smvnon the command line by itself.