You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Kedar Joshi (JIRA)" <ji...@apache.org> on 2018/03/30 11:22:00 UTC
[jira] [Updated] (LOG4J2-2297) java.sql.Time objects are
incorrectly formatted
[ https://issues.apache.org/jira/browse/LOG4J2-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kedar Joshi updated LOG4J2-2297:
--------------------------------
Description:
h1. Log4j2 incorrectly formats instance objects of `java.sql.Time`. Consider following case -
final Time time = Time.valueOf("12:00:00");
logger.info("Time : {}", time);
Now, the expected output is `Time : 12:00:00` but instead it is logged as `1970-01-01T12:00:00.000+0530`. Since `java.sql.Time` has no date component, it is wrong to format it this way.
was:
Log4j2 incorrectly formats instance objects of `java.sql.Time`. Consider following case -
final Time time = Time.valueOf("12:00:00");
logger.info("Time : {}", time);
Now, the expected output is `Time : 12:00:00` but instead it is logged as `1970-01-01T12:00:00.000+0530`. Since `java.sql.Time` has no date component, it is wrong to format it this way.
> java.sql.Time objects are incorrectly formatted
> -----------------------------------------------
>
> Key: LOG4J2-2297
> URL: https://issues.apache.org/jira/browse/LOG4J2-2297
> Project: Log4j 2
> Issue Type: Bug
> Reporter: Kedar Joshi
> Priority: Major
>
> h1. Log4j2 incorrectly formats instance objects of `java.sql.Time`. Consider following case -
> final Time time = Time.valueOf("12:00:00");
> logger.info("Time : {}", time);
>
> Now, the expected output is `Time : 12:00:00` but instead it is logged as `1970-01-01T12:00:00.000+0530`. Since `java.sql.Time` has no date component, it is wrong to format it this way.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)