The Events Calendar shows events an hour off after daylight saving: how to fix the time zone
Clocks changed, and now some dates in your repeating event show an hour off. Look for a UTC offset where a city should be, because UTC offsets don't adjust for daylight saving time. Set the site to a city such as New York, check the Time Zone Mode in The Events Calendar, then check the zone on the affected events.
It's an annoying one, and easy to miss if you only check a date before the change. Don't retype any start times yet. If the zone is the problem, fix that first and see what's still wrong.
Why only some dates in the series are an hour off
WordPress has two main kinds of time zone. A location time zone means the time in that place. A UTC offset adds or subtracts hours from Coordinated Universal Time. The location adjusts for daylight saving time. The offset doesn't.
The plugin's time zone guide has an example that may look familiar. It uses a recurring event with its own time zone, and compares two of its dates.
- The first event is 8am UTC-5 in local time.
- The second is 8am UTC-4 in local time. In UTC-5, that one is displayed as 7am.
In that example, the local time is 8am on both dates, even where you see 7am. So don't rush to edit the start time to make the page look right. You could be changing correct data to hide a wrong setting.
To see if this is your problem, pick one date from before the clock change and one from after it. For each, note the start time and zone in the editor, then the time on the public page. Keep those notes open while you work through the settings.
Set the WordPress time zone to a city
Start in Settings > General and find Timezone. Choose a city in the same time zone as you, then save. WordPress then displays the local time to confirm you picked the correct zone, so check it against your clock.
If your own city isn't listed, pick a different city in the same time zone. The Events Calendar's guide is firm on this: use a location-based time zone and avoid UTC offsets. It says offsets can cause problems with daylight saving, event imports and event data handling.
If you can't identify a city and you're considering an Etc GMT entry, read the sign carefully. The PHP manual warns that these signs are reversed from common usage. The zone eight hours ahead of GMT is Etc/GMT-8 in that database, for example. For a church, club or studio with a street address, I'd look for a city every time.
If you work on the site's code, check wp_timezone_string(). It uses an option to get a proper time zone name if one is available. Otherwise, it uses a manual offset. If you get an offset back, go back to the Timezone setting.
Check the Time Zone Mode in The Events Calendar
Next, go to Events > Settings > Display > Date & Time and find Date Format Settings. Time Zone Mode controls which zone your event times are displayed in. Here's what to check for site-wide and manual time zones.
| Option | Times display in | What to check |
|---|---|---|
| Site-wide time zone | The site's time zone | That the site is set to a city |
| Manual time zones for each event | The time zone selected for that event | That the affected event is set to a city |
The guide generally recommends manual time zones if you're not sure. The default is the site's zone, so start by getting that right. Then change the zone for the odd event that needs a different one.
Watch out if you switch modes on a busy calendar. In the guide's example, a 3:00 pm New York event shows at 12:00 pm PST on a Los Angeles site in site-wide mode. Check a few events with different zones after you switch.
Fix the zone on the affected events
Now open one of the dates you noted. Don't assume that fixing the site setting fixed this event. Read the zone shown on the event itself.
- Find the event's date and time fields, and the link that labels its time zone.
- Use that link to edit the zone, and choose a city. In the block editor, the drop-down appears on the right while you edit the time zone.
- Save the event so the new zone takes effect.
- Read the start and end times again, then compare them with the public page.
- Do the same for your date on the other side of the clock change.
The catch: in site-wide mode, changing one event's zone makes no difference to how its time displays on the front end. If you saved a new zone and nothing moved, check the mode before you try anything else.
Change the zone on many events at once
A long series is tedious to fix by hand. If you have WP-CLI access, the time zone guide includes a script for changing many events at once. It tells you to use that instead of editing the database directly. A direct database query changes only one stored value, so events keep showing the old zone.
Take a full backup first. Copy the script from the guide and save it as change-timezone.php. Read it through before you run it, and try it on a staging copy if you have one. Then run the command below.
wp eval-file change-timezone.phpAfterward, open your two test dates again. Check the editor and the public page for both. Don't stop at one correct date when you're chasing a difference between two.
If the settings are right and the time is still wrong
Check caching next. The guide says caching can show the wrong time zone, even with the display set to site-wide. Test the event with caching turned off. If that fixes it, adjust your caching plugin's settings and exclusions.
Then check for a button to update your time zone data. You may need to do this if you updated The Events Calendar after a long time of not updating it. If you see the button, click it. If there's no button, your time zone data is up to date and no action is required there.
Get the zone right before you create the next series
Before you create another run of weekly dates, check the first event's zone. I'd do this whichever way you plan to make the copies. Better to fix one event than a season of them.
If you use our plugin RecurKit, which is in beta, do this before you publish. It works with the free The Events Calendar and copies the first event's time zone to every occurrence it creates, along with the times. Its Events > Series screen edits title, times, venue and description on later dates, but not the time zone. For a series that already has the wrong zone, edit the dates in the normal editor, or delete the series and create it again.
Whichever route you take, finish by viewing a date on each side of the next clock change. If both show the start time you'd put on a poster, you're done.
Sources
- The Events Calendar guide to time zones and daylight saving
- WordPress documentation for the General settings screen
- WordPress developer reference for the site timezone string
- PHP manual warning about Etc GMT time zones
Questions
Should I use a UTC offset or a city in The Events Calendar?
Use a city. The plugin's guide says to use a location-based time zone and avoid UTC offsets, which don't adjust for daylight saving time.
Why does changing an event's time zone do nothing on the front end?
Check the Time Zone Mode. In site-wide mode, an individual event's zone makes no difference to the time displayed on the front end. Switch to manual time zones if you want times displayed in each event's zone.
What if my city isn't in the time zone list?
Choose a different city in the same time zone.
Can I change the time zone directly in the database?
The plugin's guide says to use its script instead. A direct database query changes only one stored value, so events keep showing the old zone. Take a full backup, then run the script with WP-CLI.