[rt-users] RT logs in wrong timezone

Kevin Falcone falcone at bestpractical.com
Mon Aug 15 11:43:01 EDT 2011


On Mon, Aug 15, 2011 at 12:11:57PM -0300, Wagner Pereira wrote:
> Hello, friends.
> 
> I noticed that my rt.log has been populated in the wrong timezone
> (GMT). My timezone is BRT -03:00.
> 
> I found a discussion in which someone said to edit the RT.pm file
> and change the gmtime.
> 
> Then I found what follows. Can I change that? If yes, how can I?

RT logs in GMT (it does almost everything internally in GMT). If you
want to timestamp differently, we usually suggest logging to syslog or
to apache rather than to rt.log.

-kevin

> --------------------------------
> sub InitLogging {
> ...
>         my ($package, $filename, $line) = caller($frame);
>         $p{message} =~ s/(?:\r*\n)+$//;
>         my $str = "[".gmtime(time)."] [".$p{level}."]: $p{message}
> ($filename:$line)\n";
> ...
> --------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110815/49aa758e/attachment.sig>


More information about the rt-users mailing list