Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing scheduled tasks for Sync Microsoft 365 events #2621

Open
scoriess opened this issue Aug 20, 2024 · 1 comment
Open

Failing scheduled tasks for Sync Microsoft 365 events #2621

scoriess opened this issue Aug 20, 2024 · 1 comment
Assignees
Labels
Feature - calendar sync Issue type - help wanted General questions on how to use the plugins, e.g. configurations etc. Status - need more info Further information requested to triage the issue.

Comments

@scoriess
Copy link

We have failing scheduled tasks for Sync Microsoft 365 events in to Moodle
\local_o365\feature\calsync\task\importfromoutlook

The corresponding task-log:

admin/tasklogs.php?logid=61150126

Execute scheduled task: Microsoft 365-Ereignisse mit Moodle synchronisieren (local_o365\feature\calsync\task\importfromoutlook)
... started 01:46:06. Current memory use 20.9 MB.
Debugging increased temporarily due to faildelay of 61440
Syncing events for user #3577
... used 6 dbqueries
... used 0.29813098907471 seconds
Scheduled task failed: Microsoft 365-Ereignisse mit Moodle synchronisieren (local_o365\feature\calsync\task\importfromoutlook),Failed to parse time string (@2024-07-09T15:30:00.0000000 UTC) at position 8 (-): Double timezone specification
Backtrace:
* line 1263 of /local/o365/classes/rest/unified.php: call to DateTime->__construct()
* line 419 of /local/o365/classes/feature/calsync/main.php: call to local_o365\rest\unified->get_events()
* line 75 of /local/o365/classes/feature/calsync/task/importfromoutlook.php: call to local_o365\feature\calsync\main->get_events()
* line 263 of /lib/cronlib.php: call to local_o365\feature\calsync\task\importfromoutlook->execute()
* line 120 of /lib/cronlib.php: call to cron_run_inner_scheduled_task()
* line 73 of /lib/cronlib.php: call to cron_run_scheduled_tasks()
* line 178 of /admin/cli/cron.php: call to cron_run()

The relevant part in that log seems to be:
(local_o365\feature\calsync\task\importfromoutlook),Failed to parse time string (@2024-07-09T15:30:00.0000000 UTC) at position 8 (-): Double timezone specification

Since this scheduled task is part of the Microsoft plugin local_o365 we looked up whether it has a bug-tracker and then checked the existing/reported issues there.

First we found this issue:
#2544
and someone mentioned the same error message in a comment:
#2544 (comment)
but was rejected by one of the devs and asked to create a new issue. But that dev also pointed to the Outlook timezone setting:
#2544 (comment)
"Please report it separately as a new issue. In your case, I'd like to know the Microsoft user's Outlook timezone setting."

So, we checked the other issues mentioning this setting and found the following comment, informing, that since a release for Moodle 3.9 there is the option to enable a timezone related sync-setting in the Plugin-settings:
#1389 (comment)

Here is the location of these plugin-settings on the Moodle instance with the issue:

Site administration > Plugins > Microsoft 365 Integration > Sync Settings
/admin/settings.php?section=local_o365&s_local_o365_tabs=1

image

There are two options dedicated to "Sync Outlook":

  • Sync Outlook timezone to Moodle in cronjob
  • Sync Outlook timezone to Moodle on login
    both were not enabled and we guess the cronjob-related one is the first one :)

So we enabled the first one and ran the scheduled task but it still fails with the same error message. :(

Hence we created this new issue dedicated to this error.

Kindly advise

@weilai-irl
Copy link
Collaborator

Hi @scoriess,

The "Double timezone specification" error should have been fixed in the June 2024 release of the plugin for Moodle 4.1 to 4.4. It was tracked in #2589. Please check out the latest version and confirm if this solves the issue for you.

Regards,
Lai

@weilai-irl weilai-irl self-assigned this Sep 30, 2024
@weilai-irl weilai-irl added Issue type - help wanted General questions on how to use the plugins, e.g. configurations etc. Status - need more info Further information requested to triage the issue. Feature - calendar sync labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature - calendar sync Issue type - help wanted General questions on how to use the plugins, e.g. configurations etc. Status - need more info Further information requested to triage the issue.
Projects
None yet
Development

No branches or pull requests

2 participants