Quintin Par asked:
I tried to run logwatch at follows
[[email protected] 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
[email protected] 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:
[[email protected] cron.daily]# cat /etc/TIMEZONE
UTC
Quanta’s
[[email protected] 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
[[email protected] cron.daily]# source ~/.bash_profile
[[email protected] 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 answer:
That’s not a fix, it’s a workaround. But it should get you going.
The reason it didn’t work is that it’s expecting TIMEZONE
to be capitalized.
echo UTC > /etc/TIMEZONE
View the full question and any other answers on Server Fault.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.