On 11/21/2011 11:10 AM, 蒙德鑫 wrote:
> Hi, I know in PatternLayout, %d{} is used to output the date of the
> logging event in *UTC*.
>
> My question is ,how to set timezone in PatternLayout?
It is not possible to set arbitrary timezone for PatternLayout output.
You can use either %d{} for UTC or %D{} for local time. Use %D{...%Z} to
get timezone name in the date.
--
VZ