Cannot run logwatch due to Date::Manip issue

Posted by Quintin Par on Server Fault See other posts from Server Fault or by Quintin Par
Published on 2012-08-23T06:34:24Z Indexed on 2012/08/30 3:40 UTC
Read the original article Hit count: 546

Filed under:
|
|
|
|

I tried to run logwatch at follows

[root@machine cron.daily]# ./0logwatch 
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.

My date is as follows

root@machine cron.daily]# date
Thu Aug 23 06:25:21 GMT 2012

Now based on details in various forums I tried to fix this by setting

/etc/timezone to “+0800”

but it didn’t work

My /etc/localtime points to /usr/share/zoneinfo/GMT and is managed by puppet

How do I go about fixing this? I still want all my machines to be in GMT timezone.

EDIT:
Sadly,
Both the changes are not working:

[root@machine cron.daily]# cat /etc/TIMEZONE 
UTC

Quanta’s

[root@machine cron.daily]# cat ~/.bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
export TZ=GMT

export PATH
[root@machine cron.daily]# source ~/.bash_profile
[root@machine cron.daily]# ./0logwatch 
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.

© Server Fault or respective owner

Related posts about linux

Related posts about centos