Difference between revisions of "Troubleshooting DateTime"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | [[Category:Troubleshooting]] |
||
− | |||
== DateTime won't build == |
== DateTime won't build == |
||
Line 22: | Line 20: | ||
perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names'; |
perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names'; |
||
+ | |||
+ | [[Category:Troubleshooting]] |
Latest revision as of 12:10, 20 February 2008
DateTime won't build
- In building DateTime on some computers you may need to install Module::Build first.
- In some cases installations have had to reset the environment variable
LANG
in order to get Module::Build to compile. Useexport LANG=C
(sh/bash) orsetenv LANG C
(csh/tcsh).
Time zone is not detected
The can cause the following problems:
- Obvious errors about the time zone not being found.
- When printing hardcopy with the "Show Correct Answers" option enabled, users get an error message similar to HASH(0x18fa4348) in the subroutine DateTime::TimeZone::new.
DateTime tries to calculate the time zone in various ways from data available on the server. These methods can fail and cause seemingly-unrelated errors, for example in printing hardcopy.
To work around this, set the variable $siteDefaults{timezone}
in global.conf
to a valid time zone. For example:
$siteDefaults{timezone} = "America/New_York";
Further information is available in global.conf
. Search for timezones
. globalconf
also contains instructions for finding the appropriate name for your local time zone. The command to list all time zone names is:
perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names';