[
https://issues.apache.org/jira/browse/LOG4J2-1149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14942730#comment-14942730
]
Remko Popma edited comment on LOG4J2-1149 at 10/4/15 9:06 PM:
--------------------------------------------------------------
The combination of a pattern name (like DEFAULT, ISO8601, COMPACT, ABSOLUTE)
with a time zone is not correctly handled. The
{{FixedDateFormat.createIfSupported}} method returns null to signal it cannot
handle the time zone, but FastDateFormat cannot handle the pattern name, so
DatePatternConverter falls back to the default date format.
The fix is to look up the pattern name and pass on the pattern format to
FastDateFormat when {{FixedDateFormat.createIfSupported}} returned null.
was (Author: [email protected]):
The combination of a pattern name (like DEFAULT, ISO8601, COMPACT, ABSOLUTE)
with a time zone is not correctly handled. The
{{FixedDateFormat.createIfSupported}} method returns null to signal it cannot
handle the time zone, but FastDateFormat cannot handle the pattern name, so
DatePatternConverter falls back to the default date format.
The fix is to look up the pattern name even if
{{FixedDateFormat.createIfSupported}} returned null.
> PatternLayout predefined date pattern with time zone always renders default
> date format
> ---------------------------------------------------------------------------------------
>
> Key: LOG4J2-1149
> URL: https://issues.apache.org/jira/browse/LOG4J2-1149
> Project: Log4j 2
> Issue Type: Bug
> Components: Pattern Converters
> Affects Versions: 2.4
> Reporter: Remko Popma
> Assignee: Remko Popma
> Fix For: 2.4.1
>
>
> The date pattern
> {code}
> "%d{ISO8601}{UTC}"
> {code}
> is rendered as the default date format (yyyy-MM-dd HH:mm:ss,SSS) instead.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]