You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Remko Popma (JIRA)" <ji...@apache.org> on 2015/10/04 19:37:26 UTC
[jira] [Commented] (LOG4J2-1149) PatternLayout predefined date
pattern with time zone always renders default date format
[ https://issues.apache.org/jira/browse/LOG4J2-1149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14942730#comment-14942730 ]
Remko Popma commented on LOG4J2-1149:
-------------------------------------
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org