Skip to content

Fix DatePatternConverter locale parsing when timezone is omitted#4130

Open
ramanathan1504 wants to merge 4 commits into
2.xfrom
fix-4129-locale-without-timezone
Open

Fix DatePatternConverter locale parsing when timezone is omitted#4130
ramanathan1504 wants to merge 4 commits into
2.xfrom
fix-4129-locale-without-timezone

Conversation

@ramanathan1504
Copy link
Copy Markdown
Contributor

Fixes #4129

DatePatternConverter incorrectly interpreted locale-like second arguments (for example de-DE) as timezone IDs when no timezone was provided.
This caused patterns like %d{dd-MMMM-yyyy}{de-DE} to use the JVM default locale instead of the requested locale, producing incorrect localized month names.
This change tightens locale detection so locale tags are correctly recognized in the 2-argument form, while preserving existing behavior for the 3-argument form %d{pattern}{timezone}{locale}.

@ramanathan1504
Copy link
Copy Markdown
Contributor Author

@andrei-ivanov

I think there was a duplicate comment/UI glitch and I may have accidentally removed the thread while cleaning it up. Sorry about that.

but am updated the code as per comments
Screenshot 2026-05-26 at 7 44 47 AM

…dation and add settings for editor configuration
…dation and add settings for editor configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Log4J pattern layout inconsistencies when locale is specified

1 participant