Is it possible to specify the time zone that log4j will use? I need the dates in the log file to be a different time zone than the application's. log4j's PatternLayout
uses SimpleDateFormat
. Unfortunately there doesn't appear to be a way to control SimpleDateFormat
's time zone via the pattern string (DateFormat
has setTimeZone
method but that doesn't help).
I looked at log4j's source and SimpleDateFormat
is being instiantiated in PatternParser.finalizeConverter
. Unfortunately there's not an easy way to get a hold of the DateFormat
to set the time zone.