Forum archive 2000-2006

David K. Watson - Print Hardcopy Error when Correct Answers is selected

David K. Watson - Print Hardcopy Error when Correct Answers is selected

by Arnold Pizer -
Number of replies: 0
inactiveTopicPrint Hardcopy Error when Correct Answers is selected topic started 9/21/2005; 1:34:51 PM
last post 7/19/2006; 12:30:33 AM
userDavid K. Watson - Print Hardcopy Error when Correct Answers is selected  blueArrow
9/21/2005; 1:34:51 PM (reads: 587, responses: 3)
Our students have discovered that if they try to print a hardcopy and select the show Correct Answers option, then they get an error, the first part of which I have copied below. I am guessing that this is due to some kind of conflict between the old date/time format and the new format. If this is a local configuration issue, where would we go to fix it, and what is the correct configuration?

Error messages

HASH(0x18fa4348) Call stack

The information below can help locate the source of the problem.

in DateTime::TimeZone::new called at line 71 of /local/perl-ww/lib/site_perl/5.8.4/DateTime/TimeZone/Local.pm in (eval) called at line 71 of /local/perl-ww/lib/site_perl/5.8.4/DateTime/TimeZone/Local.pm in DateTime::TimeZone::Local::_from_etc_localtime called at line 20 of /local/perl-ww/lib/site_perl/5.8.4/DateTime/TimeZone/Local.pm in DateTime::TimeZone::Local::local_time_zone called at line 50 of /local/perl-ww/lib/site_perl/5.8.4/DateTime/TimeZone.pm in DateTime::TimeZone::new called at line 1528 of /local/perl-ww/lib/site_perl/5.8.4/i686-linux/DateTime.pm

<| Post or View Comments |>


userMichael Gage - Re: Print Hardcopy Error when Correct Answers is selected  blueArrow
9/21/2005; 2:03:18 PM (reads: 698, responses: 0)
Hi David,

Could you copy a bit more of the error message? In particular I would like to know the error messages above the error line which has a line number in the file Hardcopy.pm I'd also like to know the line number in the file Hardcopy.pm

Thanks much.

Take care,

Mike

<| Post or View Comments |>


userDavid K. Watson - Re: Print Hardcopy Error when Correct Answers is selected  blueArrow
9/21/2005; 4:28:30 PM (reads: 748, responses: 0)
Sorry, here's the full message:

Error messages

HASH(0x19151524) Call stack

The information below can help locate the source of the problem.

in DateTime::TimeZone::new called at line 71 of /local/perl-ww/lib/site_perl/5.8.4/DateTime/TimeZone/Local.pm in (eval) called at line 71 of /local/perl-ww/lib/site_perl/5.8.4/DateTime/TimeZone/Local.pm in DateTime::TimeZone::Local::_from_etc_localtime called at line 20 of /local/perl-ww/lib/site_perl/5.8.4/DateTime/TimeZone/Local.pm in DateTime::TimeZone::Local::local_time_zone called at line 50 of /local/perl-ww/lib/site_perl/5.8.4/DateTime/TimeZone.pm in DateTime::TimeZone::new called at line 1528 of /local/perl-ww/lib/site_perl/5.8.4/i686-linux/DateTime.pm in DateTime::set_time_zone called at line 451 of /local/perl-ww/lib/site_perl/5.8.4/i686-linux/DateTime.pm in DateTime::from_epoch called at line 508 of /local/webwork2/lib/WeBWorK/Utils.pm in WeBWorK::Utils::formatDateTime called at line 101 of /local/webwork2/lib/WeBWorK/PG.pm in WeBWorK::PG::defineProblemEnvir called at line 116 of /local/webwork2/lib/WeBWorK/PG/Local.pm in WeBWorK::PG::Local::new_helper called at line 59 of /local/webwork2/lib/WeBWorK/PG/Local.pm in (eval) called at line 59 of /local/webwork2/lib/WeBWorK/PG/Local.pm in WeBWorK::PG::Local::new called at line 50 of /local/webwork2/lib/WeBWorK/PG.pm in WeBWorK::PG::new called at line 791 of /local/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm in WeBWorK::ContentGenerator::Hardcopy::getProblemTeX called at line 699 of /local/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm in WeBWorK::ContentGenerator::Hardcopy::getSetTeX called at line 644 of /local/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm in WeBWorK::ContentGenerator::Hardcopy::getMultiSetTeX called at line 419 of /local/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm in WeBWorK::ContentGenerator::Hardcopy::generateHardcopy called at line 131 of /local/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm in (eval) called at line 131 of /local/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm in WeBWorK::ContentGenerator::Hardcopy::pre_header_initialize called at line 146 of /local/webwork2/lib/WeBWorK/ContentGenerator.pm in WeBWorK::ContentGenerator::go called at line 282 of /local/webwork2/lib/WeBWorK.pm

 

<| Post or View Comments |>


userMichael Gage - Re: Print Hardcopy Error when Correct Answers is selected  blueArrow
7/19/2006; 12:30:33 AM (reads: 401, responses: 0)
For reasons that are not completely clear this error can be fixed by defining a timezone in global.conf. DateTime has several techniques for trying to find the local time zone from the environment, and depending on the system configuration they might all fail.

In global.conf set

 

$siteDefaults{timezone} = "America/New_York";

You can deduce the names to use from this page: http://search.cpan.org/dist/DateTime-TimeZone/

e.g. America/Chicago for most central timezone regions although there are others that handle the idiosyncrasies of time zones in Indiana and so forth.

Also it is a good idea to get a recent version of DateTime.pm -- there were some errors for timezones near longitute 0 degrees in earlier versions: http://cpan.uwinnipeg.ca/htdocs/DateTime-TimeZone/Changes.html

More information on DateTime at http://datetime.perl.org/index.cgi?Modules

see also http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$4080#4088

http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$3756#3761

and

http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$3680

and

http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$3535#3537

<| Post or View Comments |>