[ 
https://issues.apache.org/jira/browse/LOG4J2-1931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16629930#comment-16629930
 ] 

Jan Templin commented on LOG4J2-1931:
-------------------------------------

We have a simular problem but without a timezone parameter. We use Log4J 2.9.1 
and our pattern is just %d\{yyyyMMdd}.
 Day 1: After starting the application, the log file name is correct. 
 Day 2: The new logs are still written in the log file for day 1.
 Day 3: The new logs are written in a new file, but this file is named for day 
2.
 Day X: See day 3.
{code:java}
application start
example-20180827.log
application stop
timedatectl set-ntp false
sudo date 082813332018.00
> Di 28. Aug 13:33:00 CEST 2018
application start
example-20180828.log
sudo date 082913332018.00
> Mi 29. Aug 13:33:00 CEST 2018
example-20180828.log
sudo date 083013332018.00
> Do 30. Aug 13:33:00 CEST 2018
example-20180829.log
sudo date 083113332018.00
> Fr 31. Aug 13:33:00 CEST 2018
example-20180830.log
application stop
timedatectl set-ntp true
{code}
Attention! My linux system freezes after setting the system date back 
("timedatectl set-ntp true"). A restart was required.

> Wrong Date is calculated  for rollover filePattern with timezone parameter
> --------------------------------------------------------------------------
>
>                 Key: LOG4J2-1931
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1931
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.8.2
>         Environment: Windows 8
> Log4j2 2.8.2
>            Reporter: Arakha
>            Priority: Critical
>
> Wrong Date is calculated  for rollover filePattern with timezone parameter.
> Due to {{\{UTC+0}}}  calculated date is wrong. 
> current date is : 20170602 but the calculated one while rolling over is : 
> 20170601 , file name: rollapp-20170601-1.log
> Configurations used are:
> {code:xml}
>    <RollingFile name="RollingFile" 
>                        fileName="C:\temp\logs\2017-06-test\rollapp.log"
>                  
> filePattern="C:/temp/logs/${date:yyyy-MM}-test/rollapp-%d{yyyyMMdd}{UTC+0}-%i.log">
>       <PatternLayout>
>         <Pattern>%d{HH:mm:ss.SSS}{UTC+0}  %p %c{1.} [%t] %m%n</Pattern>
>       </PatternLayout>
>       <Policies>
>         <TimeBasedTriggeringPolicy />
>         <SizeBasedTriggeringPolicy size="1 MB"/>
>         
>       </Policies>
>     </RollingFile>
> {code}
> it may be related to fix done for : 
> https://issues.apache.org/jira/browse/LOG4J2-1489



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to