logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From renny.ko...@rubixinfotech.com
Subject Re: log4cxx and localtime( &thislogtime) in vc++ 8.0
Date Tue, 25 Mar 2008 15:54:14 GMT
v0.9.7 does some stuff to the timezone settings... I had the same issue... 
 I ended up forcefully saving/resetting my TZ settings to make it work.

Renny Koshy
President & CEO

--------------------------------------------
RUBIX Information Technologies, Inc.
www.rubixinfotech.com



narts <naresh@devannetworks.com> 
03/25/2008 11:49 AM
Please respond to
"Log4CXX User" <log4cxx-user@logging.apache.org>


To
log4cxx-user@logging.apache.org
cc

Subject
log4cxx and localtime( &thislogtime) in vc++ 8.0







i am using log4cxx-0.9.7 with visual studio 2005 on Windows Server 2003 
Enterprise Edition.
When is use log4cxx and win32 function localtime( &thislogtime)
localtime() is retriving the wrong time 
when is exclude log4cxx, it is working fine

sample code is....

root = Logger::getRootLogger();
logger = Logger::getLogger(_T("loggger.testlog"));
DOMConfigurator::configure(_T("../config/log4cxx.xml"));
.
.
.
time_t thislogtime;
time( &thislogtime );
newtime=localtime( &thislogtime) ;
sprintf_s(timeFormatTime,_MAX_PATH,"%d:%d:%d",newtime->tm_hour,newtime->tm_min,newtime->tm_sec);
.

is it a bug in log4cxx-0.9.7? please any help.....

Thanks
narts 



-- 
View this message in context: 
http://www.nabble.com/log4cxx-and-localtime%28--thislogtime%29-in-vc%2B%2B-8.0-tp16276522p16276522.html

Sent from the Log4cxx - Users mailing list archive at Nabble.com.



Mime
View raw message