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.

This process can also be automated with a cronjob that periodically runs the script to make sure that the data is always up-to-date. This is optional but recommended, so that you don't have to run the script manually every time timezone rules change.