ppkarwasz commented on PR #1173:
URL: https://github.com/apache/logging-log4j2/pull/1173#issuecomment-1369188293

   @dnsmkl,
   
   Thanks for the remark, I didn't know it worked like this in Java 11. 
Experimenting a little bit with this feature I conclude that:
   
    * you can add timezone data to a locale: e.g. 
`Locale.forLanguageTag("pl-PL-u-tz-uschi")`, which uses `America/Chicago` as 
timezone,
    * no sane OS sets a timezone data for the "usual" locales,
    * our date formatters **always** use `TimeZone.getDefault()` if no timezone 
is set explicitly,
    * our rotation logic **should** do the same (we don't want timestamps in 
Warsaw time, but rotation on Chicago time),
    * fortunately there are only 5 call sites of `Calendar.getInstance()` in 
Log4j2: the two that you replaced with the correct 
`Calendar.getInstance(TimeZone)`, two irrelevant in `CronExpression` and one in 
`AbsoluteDateFormat`.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to