Difference between revisions of "Troubleshooting DateTime"
Jump to navigation
Jump to search
(New page: == DateTime won't build == * In building DateTime on some computers you may need to install [http://search.cpan.org/~kwilliams/Module-Build/ Module::Build] first. * In some cases installa...) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
* In building DateTime on some computers you may need to install [http://search.cpan.org/~kwilliams/Module-Build/ Module::Build] first. |
* In building DateTime on some computers you may need to install [http://search.cpan.org/~kwilliams/Module-Build/ Module::Build] first. |
||
− | * In some cases installations have had to reset the environment variable |
+ | * In some cases installations have had to reset the environment variable <code>LANG</code> in order to get Module::Build to compile. Use <code>export LANG=C</code> (sh/bash) or <code>setenv LANG C</code> (csh/tcsh). |
− | == 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 == |
||
+ | == 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 [http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$3815?mode=topic&y=2006&m=7&d=20) printing hardcopy]. |
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 [http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$3815?mode=topic&y=2006&m=7&d=20) printing hardcopy]. |
||
Line 15: | 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';