Extension:CampaignEvents

API
See /Api for the list of API endpoints provided by this extension.

Script to update timezones
The extension stores the local time and timezone for each event, to guarantee that the local time remains accurate even if time zone rules change. However,internally it also stores UTC timestamps so that certain operations like sorting are possible; you can read more details in T314871. The UTC timestamps may go out of sync with the local ones if time zone rules change, which happens more commonly than you may think (see more information on the same task). In order to mitigate that, the extension provides a maintenance script that recomputes the UTC timestamps for all events according to the latest timezone rules, and stores them back into the database.

In order for this to work, you have to make sure that PHP has access to the latest version of the tz database. The PHP manual provides some context about this. The easiest solution is to install the timezonedb PECL package and make sure to keep it up-to-date.

Assuming that PHP has access to the latest timezone rules, you can run the script with:

The script also takes an optional  parameter where you can specify the name of a time zone whose rules changed; this parameter can be repeated multiple times. If passed, the script will only update events whose timezone matches one of the timezones specified via this parameter.

If you upgrade the time zone database automatically (e.g., with a cronjob), you can make that job also execute this script, so that you don't have to do it manually every time you upgrade the time zone database.

Script to aggregate participant answers
The extension provides a maintenance script that aggregates participant answers after a 90 day period. The script can be run with:

The script should be configured to run automatically (e.g., as a cronjob) to make sure that PII isn't retained for longer than it needs to.