From: J. D. B. <jd...@go...> - 2006-12-07 16:26:52
|
On December 7, 2006, J. David Blackstone wrote: > On December 7, 2006, Mike Schilli wrote: >=20 > > There's an undocumented feature: > >=20 > > $Log::Log4perl::DateFormat::GMTIME =3D 1; > >=20 > > will use UTC instead of local time. >=20 > Thanks, Mike! That's just what I was looking for! And as a bonus, I figured out how to cheat and set this in my configurati= on file: log4perl.DateFormat.GMTIME =3D sub { $Log::Log4perl::DateFormat::GMTIME =3D= 1 } That's probably an abuse of the configuration file sub notation, using a = side effect instead of returning a value, but it works. :) And somehow I t= hink I might have to fight a small political battle to explicitly set a pro= gram to log in UTC rather than local time zone, but I don't think anyone wi= ll notice or care if it's done in that config file. :) (Which is why I wor= ked so hard to figure out how to make Oracle insert its timestamps in UTC f= or me.) jdb |