Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.20.0
-
None
-
None
-
Java 17
Spring Boot 2.7.9
Log4j2 2.20
Description
It has been reported that the RollingFile TimeZone issue has been fixed in version 2.20.
But it still follows the server time and the TimeZone I specified is ignored.
<RollingFile name="DefaultAppender" fileName="${sys:LOG_PATH}/${sys:DEFAULT_LOG_NAME}" filePattern="./log/backup/default/app2-%d{yyyy-MM-dd}{GMT+9}.log.gz"> <PatternLayout pattern="${sys:FILE_LOG_PATTERN}"/> <Policies> <CronTriggeringPolicy schedule="0 0 17 * * ? *" /> <SizeBasedTriggeringPolicy size="10 MB" /> </Policies> </RollingFile>
Action I wanted: Action at 08:00:00 UTC.
Actual operation: Operates at 17:00:00 UTC.
The time I specify should be the same as my locale's time reflected by the TimeZone.
But still my TimeZone in terms of UTC is meaningless.