Cannot display the timezone using perl DateTime andTimeZone
Issue
- Script written in perl is unable to retrieve the timezone, on running the relevant code, it shows:
# perl -T -MDateTime::TimeZone::Local -le 'print DateTime::TimeZone::Local->TimeZone()->name'
Cannot determine local time zone
Environment
- RHEL 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
