WeBWorK Main Forum

Error that legitimate timezone is "not legal"

Error that legitimate timezone is "not legal"

by Alasdair McAndrew -
Number of replies: 1
I am setting up a new course, but when I go to the homework sets editor page, I get a heap of warnings; well in fact one warning:
  • Australia/Melbourne is not a legal time zone name. Fix it on the Course Configuration page. 
  • <a href="http://en.wikipedia.org/wiki/List_of_zoneinfo_time_zones">View list of time zones.</a>
but repeated 13 times.

The trouble with this is that "Australia/Melbourne" IS a perfectly valid timezone, as checked on

https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

and with the command:

perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names' 

I've had this problem before, and there was a problem between WeBWorK and Perl's timezone management, but even though I'd set one time (for a homework set due date), and WeBWorK would translate it into another time (for display), I never got all these warnings.

So how do I manage my timezone so that I don't get these warnings? Do I need to update any of my Perl modules? Or should I just set my timezone to be America/New_York and live with WeBWorK time and local time being 15 hours different? That is, should I remove any timezone settings in any of my *.conf files? I'm using WW and pg v2.10, under Ubuntu server 14.04, and "perl -v" gives me:

"This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi (with 41 registered patches, see perl -V for more detail)"

Advice, as always, would be gratefully received. (Our teaching semester starts on Feb 29, and I hope to have it running smoothly then.)

Thanks,

Alasdair

In reply to Alasdair McAndrew

Re: Error that legitimate timezone is "not legal"

by Alasdair McAndrew -
Well, I've just discovered that although "Australia/Melbourne" is rejected as a timezone, "Australia/NSW" seems OK. Note that "Australia/Victoria" (Victoria being the Australian state of which Melbourne is the capital) is also rejected, as is "Australia/Sydney". I have no idea why this should be so, and why Perl/WeBWorK should allow some timezones and reject others. I also tried leaving the timezone field empty in site.conf and localOverrides.conf, but that again led to errors.