From: Mike S. <m...@pe...> - 2006-12-07 08:32:49
|
On Tue, 5 Dec 2006, J. David Blackstone wrote: > I'd like all of my log messages to report with a UTC timezone, but I don't want to change the timezone for the whole job. Is there a way to specify the timezone you want in the layout? There's an undocumented feature: $Log::Log4perl::DateFormat::GMTIME = 1; will use UTC instead of local time. -- Mike Mike Schilli m...@pe... > > FYI, Oracle makes it well-night impossible to generate a value of type TIMESTAMP WITH TIME ZONE for the current time but in UTC, unless you are running either the client process or the server in UTC. Eventually I found out the way to do it was > > FROM_TZ(SYS_EXTRACT_UTC(CURRENT_TIMESTAMP), '00:00') > > (So my Log::Log4perl::Appender::DBI appender gets everything in the timezone I want, but I get pot luck with Log::Log4perl::Appender::File and Log::Log4perl::Appender::Screen :) ) > > jdb > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |