From: Paolino M. <pao...@gm...> - 2013-01-24 12:15:04
|
Hi all, in my logfiles I have the timestamp with 1 hour back. How to set the correct time zone? I'm not using a properties file but managing in C++ code, ie: log4cplus::PatternLayout *pl = new log4cplus::PatternLayout("%d{%d-%m-%Y %H:%M:%S.%q}[%-5t] %-5p: %m%n"); ... thanks pm |
From: Václav Z. <vha...@gm...> - 2013-01-24 14:25:07
|
On 24 January 2013 13:14, Paolino Marmolaro wrote: > Hi all, Hi. > > in my logfiles I have the timestamp with 1 hour back. > How to set the correct time zone? > > I'm not using a properties file but managing in C++ code, ie: > > log4cplus::PatternLayout *pl = new log4cplus::PatternLayout("%d{%d-%m-%Y > %H:%M:%S.%q}[%-5t] %-5p: %m%n"); Here, use %D{} (local time) instead of %d{} (UTC). See http://log4cplus.sourceforge.net/docs/html/classlog4cplus_1_1PatternLayout.html for more detail on pattern layout format. -- VZ |