Getting Error in New User Registration after upgrade into 3.3 version

Re: Getting Error in New User Registration after upgrade into 3.3 version

by Jamie Kramer -
Number of replies: 5

Can you confirm that the date and time are set correctly on the server?  Settings > Site administration > Server > PHP info  is one quick place to see this.

Also, what is the default timezone set to in Moodle? See https://docs.moodle.org/33/en/Location#Default_time_zone for more information.



In reply to Jamie Kramer

Re: Getting Error in New User Registration after upgrade into 3.3 version

by Arul R -

Hi Jamle Kramer, Thanks for your response.

I checked the server PHP info and default timezone settings under Site administration > Location > Location settings  both having the same value only, but still im getting the same error.

Can you please suggest me any other option .Thanks..

In reply to Arul R

Re: Getting Error in New User Registration after upgrade into 3.3 version

by Jamie Kramer -

Hi Arul. What operating system is your Moodle web server running? Linux or Windows? Also is the Operating System 32 bit or 64 bit?

And when you checked PHP info, it shows the correct date and time?

This error: "This can fail if year is more than 2038 and OS is 32 bit windows" I would assume does not apply to your situation, but we ought to be sure. Just cover the most obvious thing, if that makes sense.

In reply to Jamie Kramer

Re: Getting Error in New User Registration after upgrade into 3.3 version

by Arul R -

Hi jamle,

Im using Windows server 64 bit

And in phpinfo i can't able to find the date and time, instead i found the time zone and the timezone seems same as the value in default timezone in moodle.

Default time Zone : Europe/Berlin

Force Time Zone : "Users can choose their own timezone"

In reply to Arul R

Re: Getting Error in New User Registration after upgrade into 3.3 version

by Jamie Kramer -

What is the default timezone is set to in location settings? I could test the same on a 33 site and compare.

Also, what is the current setting for "force timezone" in location settings?

Here is a suggestion: go into your location settings, and try changing the default timezone to something else, and then change it back to what it was. Perhaps there is just something wrong with the way the timezone is set internally after upgrades. It is a long shot but a simple thing to try at least.

If these things don't work, it seems that going in at the code level and trying to add some debugging output might be necessary. At https://github.com/moodle/moodle/blob/MOODLE_33_STABLE/lib/moodlelib.php the code is:

Moodle 33 make_timestamp function


If your OS is 64 bit and the time is correct on your server, then I believe that one of the parameters provided to the make_timestamp function could be bad. Or maybe get_user_timezone_object call is getting bad data. Maybe others have some better suggestions, but where I would go next is debugging within the above function.

Average of ratings: Useful (1)
In reply to Arul R

Re: Getting Error in New User Registration after upgrade into 3.3 version

by Jamie Kramer -

Are you using any custom user profile date field? Check at: Site administration/Users/Accounts/User profile fields

If any of these fields are "date" fields and are required on the sign-up page, perhaps it is causing interference. Is the user required to enter a date field on user registration page?