tisdag 7 februari 2012

Hacking a Perl module

I'm not a programmer but sometimes I need to get hacking a-way with vim. For several days logwatch have not been working on my server and that is anoying! I'm not really safer or more secure with it since it always looks back in yesterdays log files. However, it is always nice to get a life signal and a status update. Like a nice wall message on Facebook from a friend...

So, for all you geeks out there that is running a CENTOS box and get this error message:

# logwatch
ERROR: Date::Manip unable to determine TimeZone.

Execute the following command in a shell prompt:
perldoc Date::Manip
The section titled TIMEZONES describes valid TimeZones
and where they can be defined.


You should try to solve it by our self first, it is a part of knowing our system. If you don't succeed with Google or with "man bash", here is to solution:

In the file
/usr/share/perl5/Date/Manip.pm
just add your timezone variable in row 15. For me it looks like this:
$TZ='CET';


All these recommendations is covered by the trademark "works fine for me!"...

Inga kommentarer: